Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
42e052d4
Commit
42e052d4
authored
Jul 26, 2001
by
Ian Pilcher
Committed by
Alexandre Julliard
Jul 26, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite TrueType font metric parsing code.
parent
67f0a70c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
12 deletions
+29
-12
afm.c
dlls/wineps/afm.c
+23
-10
init.c
dlls/wineps/init.c
+2
-1
ps.c
dlls/wineps/ps.c
+2
-0
psdrv.h
dlls/wineps/psdrv.h
+2
-1
truetype.c
dlls/wineps/truetype.c
+0
-0
No files found.
dlls/wineps/afm.c
View file @
42e052d4
...
...
@@ -497,10 +497,13 @@ const AFM *PSDRV_FindAFMinList(FONTFAMILY *head, char *name)
*
* PSDRV_AddAFMtoList
*
* Adds an afm to the list whose head is pointed to by head. Creates new
* family node if necessary and always creates a new AFMLISTENTRY.
* Adds an afm to the list whose head is pointed to by head. Creates new
* family node if necessary and always creates a new AFMLISTENTRY.
*
* Returns FALSE for memory allocation error; returns TRUE, but sets *p_added
* to FALSE, for duplicate.
*/
BOOL
PSDRV_AddAFMtoList
(
FONTFAMILY
**
head
,
const
AFM
*
afm
)
BOOL
PSDRV_AddAFMtoList
(
FONTFAMILY
**
head
,
const
AFM
*
afm
,
BOOL
*
p_added
)
{
FONTFAMILY
*
family
=
*
head
;
FONTFAMILY
**
insert
=
head
;
...
...
@@ -535,6 +538,7 @@ BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm)
}
strcpy
(
family
->
FamilyName
,
afm
->
FamilyName
);
family
->
afmlist
=
newafmle
;
*
p_added
=
TRUE
;
return
TRUE
;
}
else
{
...
...
@@ -543,6 +547,7 @@ BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm)
if
(
!
strcmp
(
tmpafmle
->
afm
->
FontName
,
afm
->
FontName
))
{
WARN
(
"Ignoring duplicate FontName '%s'
\n
"
,
afm
->
FontName
);
HeapFree
(
PSDRV_Heap
,
0
,
newafmle
);
*
p_added
=
FALSE
;
return
TRUE
;
/* not a fatal error */
}
tmpafmle
=
tmpafmle
->
next
;
...
...
@@ -555,6 +560,7 @@ BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm)
tmpafmle
->
next
=
newafmle
;
*
p_added
=
TRUE
;
return
TRUE
;
}
...
...
@@ -834,14 +840,19 @@ static VOID CalcWindowsMetrics(AFM *afm)
static
BOOL
AddBuiltinAFMs
()
{
int
i
=
0
;
const
AFM
*
const
*
afm
=
PSDRV_BuiltinAFMs
;
while
(
PSDRV_BuiltinAFMs
[
i
]
!=
NULL
)
while
(
*
afm
!=
NULL
)
{
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
PSDRV_BuiltinAFMs
[
i
])
==
FALSE
)
BOOL
added
;
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
*
afm
,
&
added
)
==
FALSE
)
return
FALSE
;
++
i
;
if
(
added
==
FALSE
)
TRACE
(
"Ignoring built-in font %s
\n
"
,
(
*
afm
)
->
FontName
);
++
afm
;
}
return
TRUE
;
...
...
@@ -861,6 +872,7 @@ static BOOL AddBuiltinAFMs()
static
BOOL
PSDRV_ReadAFMDir
(
const
char
*
afmdir
)
{
DIR
*
dir
;
const
AFM
*
afm
;
BOOL
added
;
dir
=
opendir
(
afmdir
);
if
(
dir
)
{
...
...
@@ -881,7 +893,7 @@ static BOOL PSDRV_ReadAFMDir(const char* afmdir) {
TRACE
(
"loading AFM %s
\n
"
,
afmfn
);
afm
=
PSDRV_AFMParse
(
afmfn
);
if
(
afm
)
{
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
afm
)
==
FALSE
)
{
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
afm
,
&
added
)
==
FALSE
)
{
closedir
(
dir
);
return
FALSE
;
}
...
...
@@ -908,6 +920,7 @@ BOOL PSDRV_GetFontMetrics(void)
char
value
[
256
];
HKEY
hkey
;
DWORD
type
,
key_len
,
value_len
;
BOOL
added
;
if
(
PSDRV_GlyphListInit
()
!=
0
)
return
FALSE
;
...
...
@@ -924,7 +937,7 @@ BOOL PSDRV_GetFontMetrics(void)
const
AFM
*
afm
=
PSDRV_AFMParse
(
value
);
if
(
afm
)
{
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
afm
)
==
FALSE
)
{
if
(
PSDRV_AddAFMtoList
(
&
PSDRV_AFMFontList
,
afm
,
&
added
)
==
FALSE
)
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
...
...
dlls/wineps/init.c
View file @
42e052d4
...
...
@@ -620,7 +620,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
"ignoring
\n
"
,
font
->
Name
);
}
else
{
if
(
PSDRV_AddAFMtoList
(
&
pi
->
Fonts
,
afm
)
==
FALSE
)
{
BOOL
added
;
if
(
PSDRV_AddAFMtoList
(
&
pi
->
Fonts
,
afm
,
&
added
)
==
FALSE
)
{
PSDRV_FreeAFMList
(
pi
->
Fonts
);
goto
cleanup
;
}
...
...
dlls/wineps/ps.c
View file @
42e052d4
...
...
@@ -112,8 +112,10 @@ static char psrrectangle[] = /* x, y, width, height, -width */
"%d 0 rlineto
\n
"
"closepath
\n
"
;
#if 0
static char psshow[] = /* string */
"(%s) show\n";
#endif
static
const
char
psglyphshow
[]
=
/* glyph name */
"/%s glyphshow
\n
"
;
...
...
dlls/wineps/psdrv.h
View file @
42e052d4
...
...
@@ -298,7 +298,8 @@ extern BOOL PSDRV_GetFontMetrics(void);
extern
PPD
*
PSDRV_ParsePPD
(
char
*
fname
);
extern
PRINTERINFO
*
PSDRV_FindPrinterInfo
(
LPCSTR
name
);
extern
const
AFM
*
PSDRV_FindAFMinList
(
FONTFAMILY
*
head
,
char
*
name
);
extern
BOOL
PSDRV_AddAFMtoList
(
FONTFAMILY
**
head
,
const
AFM
*
afm
);
extern
BOOL
PSDRV_AddAFMtoList
(
FONTFAMILY
**
head
,
const
AFM
*
afm
,
BOOL
*
p_added
);
extern
void
PSDRV_FreeAFMList
(
FONTFAMILY
*
head
);
extern
BOOL
WINAPI
PSDRV_Init
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
);
...
...
dlls/wineps/truetype.c
View file @
42e052d4
This diff is collapsed.
Click to expand it.
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