Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f220db9
Commit
1f220db9
authored
Aug 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Copy 16-bit font definitions to avoid including 16-bit headers.
parent
c4a9d1cf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
296 additions
and
61 deletions
+296
-61
fnt2bdf.c
tools/fnt2bdf.c
+124
-1
fnt2bdf.h
tools/fnt2bdf.h
+0
-56
fnt2fon.c
tools/fnt2fon.c
+87
-3
sfnt2fnt.c
tools/sfnt2fnt.c
+85
-1
No files found.
tools/fnt2bdf.c
View file @
1f220db9
...
...
@@ -39,7 +39,130 @@
# include <io.h>
#endif
#include "fnt2bdf.h"
#include "windef.h"
#include "wingdi.h"
enum
data_types
{
dfChar
,
dfShort
,
dfLong
,
dfString
};
#define ERROR_DATA 1
#define ERROR_VERSION 2
#define ERROR_SIZE 3
#define ERROR_MEMORY 4
#define ERROR_FILE 5
#include "pshpack1.h"
typedef
struct
{
INT16
dfType
;
INT16
dfPoints
;
INT16
dfVertRes
;
INT16
dfHorizRes
;
INT16
dfAscent
;
INT16
dfInternalLeading
;
INT16
dfExternalLeading
;
BYTE
dfItalic
;
BYTE
dfUnderline
;
BYTE
dfStrikeOut
;
INT16
dfWeight
;
BYTE
dfCharSet
;
INT16
dfPixWidth
;
INT16
dfPixHeight
;
BYTE
dfPitchAndFamily
;
INT16
dfAvgWidth
;
INT16
dfMaxWidth
;
BYTE
dfFirstChar
;
BYTE
dfLastChar
;
BYTE
dfDefaultChar
;
BYTE
dfBreakChar
;
INT16
dfWidthBytes
;
LONG
dfDevice
;
LONG
dfFace
;
LONG
dfBitsPointer
;
LONG
dfBitsOffset
;
BYTE
dfReserved
;
LONG
dfFlags
;
INT16
dfAspace
;
INT16
dfBspace
;
INT16
dfCspace
;
LONG
dfColorPointer
;
LONG
dfReserved1
[
4
];
}
FONTINFO16
;
typedef
struct
{
WORD
offset
;
WORD
length
;
WORD
flags
;
WORD
id
;
WORD
handle
;
WORD
usage
;
}
NE_NAMEINFO
;
typedef
struct
{
WORD
type_id
;
WORD
count
;
DWORD
resloader
;
}
NE_TYPEINFO
;
#define NE_FFLAGS_SINGLEDATA 0x0001
#define NE_FFLAGS_MULTIPLEDATA 0x0002
#define NE_FFLAGS_WIN32 0x0010
#define NE_FFLAGS_FRAMEBUF 0x0100
#define NE_FFLAGS_CONSOLE 0x0200
#define NE_FFLAGS_GUI 0x0300
#define NE_FFLAGS_SELFLOAD 0x0800
#define NE_FFLAGS_LINKERROR 0x2000
#define NE_FFLAGS_CALLWEP 0x4000
#define NE_FFLAGS_LIBMODULE 0x8000
#define NE_OSFLAGS_WINDOWS 0x02
#define NE_RSCTYPE_FONTDIR 0x8007
#define NE_RSCTYPE_FONT 0x8008
#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
#define NE_SEGFLAGS_DATA 0x0001
#define NE_SEGFLAGS_ALLOCATED 0x0002
#define NE_SEGFLAGS_LOADED 0x0004
#define NE_SEGFLAGS_ITERATED 0x0008
#define NE_SEGFLAGS_MOVEABLE 0x0010
#define NE_SEGFLAGS_SHAREABLE 0x0020
#define NE_SEGFLAGS_PRELOAD 0x0040
#define NE_SEGFLAGS_EXECUTEONLY 0x0080
#define NE_SEGFLAGS_READONLY 0x0080
#define NE_SEGFLAGS_RELOC_DATA 0x0100
#define NE_SEGFLAGS_SELFLOAD 0x0800
#define NE_SEGFLAGS_DISCARDABLE 0x1000
#define NE_SEGFLAGS_32BIT 0x2000
typedef
struct
tagFontHeader
{
SHORT
dfVersion
;
/* Version */
LONG
dfSize
;
/* Total File Size */
char
dfCopyright
[
60
];
/* Copyright notice */
FONTINFO16
fi
;
/* FONTINFO structure */
}
fnt_hdrS
;
typedef
struct
WinCharStruct
{
unsigned
int
charWidth
;
long
charOffset
;
}
WinCharS
;
typedef
struct
fntFontStruct
{
fnt_hdrS
hdr
;
WinCharS
*
dfCharTable
;
unsigned
char
*
dfDeviceP
;
unsigned
char
*
dfFaceP
;
unsigned
char
*
dfBitsPointerP
;
unsigned
char
*
dfBitsOffsetP
;
short
*
dfColorTableP
;
}
fnt_fontS
;
#include "poppack.h"
#define FILE_ERROR 0
#define FILE_DLL 1
...
...
tools/fnt2bdf.h
deleted
100644 → 0
View file @
c4a9d1cf
/*
* Copyright 1994-1996 Kevin Carothers and Alex Korobka
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/wingdi16.h"
#include "pshpack1.h"
enum
data_types
{
dfChar
,
dfShort
,
dfLong
,
dfString
};
#define ERROR_DATA 1
#define ERROR_VERSION 2
#define ERROR_SIZE 3
#define ERROR_MEMORY 4
#define ERROR_FILE 5
typedef
struct
tagFontHeader
{
SHORT
dfVersion
;
/* Version */
LONG
dfSize
;
/* Total File Size */
char
dfCopyright
[
60
];
/* Copyright notice */
FONTINFO16
fi
;
/* FONTINFO structure */
}
fnt_hdrS
;
typedef
struct
WinCharStruct
{
unsigned
int
charWidth
;
long
charOffset
;
}
WinCharS
;
typedef
struct
fntFontStruct
{
fnt_hdrS
hdr
;
WinCharS
*
dfCharTable
;
unsigned
char
*
dfDeviceP
;
unsigned
char
*
dfFaceP
;
unsigned
char
*
dfBitsPointerP
;
unsigned
char
*
dfBitsOffsetP
;
short
*
dfColorTableP
;
}
fnt_fontS
;
#include "poppack.h"
tools/fnt2fon.c
View file @
1f220db9
...
...
@@ -34,10 +34,94 @@
# include <io.h>
#endif
#include "wine/winbase16.h"
#include "wine/wingdi16.h"
#include "windef.h"
#include "pshpack1.h"
typedef
struct
{
INT16
dfType
;
INT16
dfPoints
;
INT16
dfVertRes
;
INT16
dfHorizRes
;
INT16
dfAscent
;
INT16
dfInternalLeading
;
INT16
dfExternalLeading
;
BYTE
dfItalic
;
BYTE
dfUnderline
;
BYTE
dfStrikeOut
;
INT16
dfWeight
;
BYTE
dfCharSet
;
INT16
dfPixWidth
;
INT16
dfPixHeight
;
BYTE
dfPitchAndFamily
;
INT16
dfAvgWidth
;
INT16
dfMaxWidth
;
BYTE
dfFirstChar
;
BYTE
dfLastChar
;
BYTE
dfDefaultChar
;
BYTE
dfBreakChar
;
INT16
dfWidthBytes
;
LONG
dfDevice
;
LONG
dfFace
;
LONG
dfBitsPointer
;
LONG
dfBitsOffset
;
BYTE
dfReserved
;
LONG
dfFlags
;
INT16
dfAspace
;
INT16
dfBspace
;
INT16
dfCspace
;
LONG
dfColorPointer
;
LONG
dfReserved1
[
4
];
}
FONTINFO16
;
typedef
struct
{
WORD
offset
;
WORD
length
;
WORD
flags
;
WORD
id
;
WORD
handle
;
WORD
usage
;
}
NE_NAMEINFO
;
typedef
struct
{
WORD
type_id
;
WORD
count
;
DWORD
resloader
;
}
NE_TYPEINFO
;
#define NE_FFLAGS_SINGLEDATA 0x0001
#define NE_FFLAGS_MULTIPLEDATA 0x0002
#define NE_FFLAGS_WIN32 0x0010
#define NE_FFLAGS_FRAMEBUF 0x0100
#define NE_FFLAGS_CONSOLE 0x0200
#define NE_FFLAGS_GUI 0x0300
#define NE_FFLAGS_SELFLOAD 0x0800
#define NE_FFLAGS_LINKERROR 0x2000
#define NE_FFLAGS_CALLWEP 0x4000
#define NE_FFLAGS_LIBMODULE 0x8000
#define NE_OSFLAGS_WINDOWS 0x02
#define NE_RSCTYPE_FONTDIR 0x8007
#define NE_RSCTYPE_FONT 0x8008
#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
#define NE_SEGFLAGS_DATA 0x0001
#define NE_SEGFLAGS_ALLOCATED 0x0002
#define NE_SEGFLAGS_LOADED 0x0004
#define NE_SEGFLAGS_ITERATED 0x0008
#define NE_SEGFLAGS_MOVEABLE 0x0010
#define NE_SEGFLAGS_SHAREABLE 0x0020
#define NE_SEGFLAGS_PRELOAD 0x0040
#define NE_SEGFLAGS_EXECUTEONLY 0x0080
#define NE_SEGFLAGS_READONLY 0x0080
#define NE_SEGFLAGS_RELOC_DATA 0x0100
#define NE_SEGFLAGS_SELFLOAD 0x0800
#define NE_SEGFLAGS_DISCARDABLE 0x1000
#define NE_SEGFLAGS_32BIT 0x2000
struct
_fnt_header
{
SHORT
dfVersion
;
...
...
tools/sfnt2fnt.c
View file @
1f220db9
...
...
@@ -45,19 +45,103 @@
#endif
#include "wine/unicode.h"
#include "wine/wingdi16.h"
#include "wingdi.h"
#include "pshpack1.h"
typedef
struct
{
INT16
dfType
;
INT16
dfPoints
;
INT16
dfVertRes
;
INT16
dfHorizRes
;
INT16
dfAscent
;
INT16
dfInternalLeading
;
INT16
dfExternalLeading
;
BYTE
dfItalic
;
BYTE
dfUnderline
;
BYTE
dfStrikeOut
;
INT16
dfWeight
;
BYTE
dfCharSet
;
INT16
dfPixWidth
;
INT16
dfPixHeight
;
BYTE
dfPitchAndFamily
;
INT16
dfAvgWidth
;
INT16
dfMaxWidth
;
BYTE
dfFirstChar
;
BYTE
dfLastChar
;
BYTE
dfDefaultChar
;
BYTE
dfBreakChar
;
INT16
dfWidthBytes
;
LONG
dfDevice
;
LONG
dfFace
;
LONG
dfBitsPointer
;
LONG
dfBitsOffset
;
BYTE
dfReserved
;
LONG
dfFlags
;
INT16
dfAspace
;
INT16
dfBspace
;
INT16
dfCspace
;
LONG
dfColorPointer
;
LONG
dfReserved1
[
4
];
}
FONTINFO16
;
typedef
struct
{
WORD
dfVersion
;
DWORD
dfSize
;
char
dfCopyright
[
60
];
FONTINFO16
fi
;
}
FNT_HEADER
;
typedef
struct
{
WORD
offset
;
WORD
length
;
WORD
flags
;
WORD
id
;
WORD
handle
;
WORD
usage
;
}
NE_NAMEINFO
;
typedef
struct
{
WORD
type_id
;
WORD
count
;
DWORD
resloader
;
}
NE_TYPEINFO
;
#define NE_FFLAGS_SINGLEDATA 0x0001
#define NE_FFLAGS_MULTIPLEDATA 0x0002
#define NE_FFLAGS_WIN32 0x0010
#define NE_FFLAGS_FRAMEBUF 0x0100
#define NE_FFLAGS_CONSOLE 0x0200
#define NE_FFLAGS_GUI 0x0300
#define NE_FFLAGS_SELFLOAD 0x0800
#define NE_FFLAGS_LINKERROR 0x2000
#define NE_FFLAGS_CALLWEP 0x4000
#define NE_FFLAGS_LIBMODULE 0x8000
#define NE_OSFLAGS_WINDOWS 0x02
#define NE_RSCTYPE_FONTDIR 0x8007
#define NE_RSCTYPE_FONT 0x8008
#define NE_RSCTYPE_SCALABLE_FONTPATH 0x80cc
#define NE_SEGFLAGS_DATA 0x0001
#define NE_SEGFLAGS_ALLOCATED 0x0002
#define NE_SEGFLAGS_LOADED 0x0004
#define NE_SEGFLAGS_ITERATED 0x0008
#define NE_SEGFLAGS_MOVEABLE 0x0010
#define NE_SEGFLAGS_SHAREABLE 0x0020
#define NE_SEGFLAGS_PRELOAD 0x0040
#define NE_SEGFLAGS_EXECUTEONLY 0x0080
#define NE_SEGFLAGS_READONLY 0x0080
#define NE_SEGFLAGS_RELOC_DATA 0x0100
#define NE_SEGFLAGS_SELFLOAD 0x0800
#define NE_SEGFLAGS_DISCARDABLE 0x1000
#define NE_SEGFLAGS_32BIT 0x2000
typedef
struct
{
WORD
width
;
DWORD
offset
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment