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
a9eae850
Commit
a9eae850
authored
Jul 22, 2001
by
Ian Pilcher
Committed by
Alexandre Julliard
Jul 22, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant data structure from font metrics.
parent
3f46d3d6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
39 additions
and
157 deletions
+39
-157
afm.c
dlls/wineps/afm.c
+4
-75
AvantGarde_Book.c
dlls/wineps/data/AvantGarde_Book.c
+1
-2
AvantGarde_BookOblique.c
dlls/wineps/data/AvantGarde_BookOblique.c
+1
-2
AvantGarde_Demi.c
dlls/wineps/data/AvantGarde_Demi.c
+1
-2
AvantGarde_DemiOblique.c
dlls/wineps/data/AvantGarde_DemiOblique.c
+0
-1
Bookman_Demi.c
dlls/wineps/data/Bookman_Demi.c
+1
-2
Bookman_DemiItalic.c
dlls/wineps/data/Bookman_DemiItalic.c
+1
-2
Bookman_Light.c
dlls/wineps/data/Bookman_Light.c
+1
-2
Bookman_LightItalic.c
dlls/wineps/data/Bookman_LightItalic.c
+1
-2
Courier.c
dlls/wineps/data/Courier.c
+1
-2
Courier_Bold.c
dlls/wineps/data/Courier_Bold.c
+1
-2
Courier_BoldOblique.c
dlls/wineps/data/Courier_BoldOblique.c
+1
-2
Courier_Oblique.c
dlls/wineps/data/Courier_Oblique.c
+1
-2
Helvetica.c
dlls/wineps/data/Helvetica.c
+1
-2
Helvetica_Bold.c
dlls/wineps/data/Helvetica_Bold.c
+1
-2
Helvetica_BoldOblique.c
dlls/wineps/data/Helvetica_BoldOblique.c
+1
-2
Helvetica_Narrow.c
dlls/wineps/data/Helvetica_Narrow.c
+1
-2
Helvetica_Narrow_Bold.c
dlls/wineps/data/Helvetica_Narrow_Bold.c
+1
-2
Helvetica_Narrow_BoldOblique.c
dlls/wineps/data/Helvetica_Narrow_BoldOblique.c
+1
-2
Helvetica_Narrow_Oblique.c
dlls/wineps/data/Helvetica_Narrow_Oblique.c
+1
-2
Helvetica_Oblique.c
dlls/wineps/data/Helvetica_Oblique.c
+1
-2
NewCenturySchlbk_Bold.c
dlls/wineps/data/NewCenturySchlbk_Bold.c
+1
-2
NewCenturySchlbk_BoldItalic.c
dlls/wineps/data/NewCenturySchlbk_BoldItalic.c
+1
-2
NewCenturySchlbk_Italic.c
dlls/wineps/data/NewCenturySchlbk_Italic.c
+1
-2
NewCenturySchlbk_Roman.c
dlls/wineps/data/NewCenturySchlbk_Roman.c
+1
-2
Palatino_Bold.c
dlls/wineps/data/Palatino_Bold.c
+1
-2
Palatino_BoldItalic.c
dlls/wineps/data/Palatino_BoldItalic.c
+1
-2
Palatino_Italic.c
dlls/wineps/data/Palatino_Italic.c
+1
-2
Palatino_Roman.c
dlls/wineps/data/Palatino_Roman.c
+1
-2
Symbol.c
dlls/wineps/data/Symbol.c
+0
-0
Times_Bold.c
dlls/wineps/data/Times_Bold.c
+1
-2
Times_BoldItalic.c
dlls/wineps/data/Times_BoldItalic.c
+1
-2
Times_Italic.c
dlls/wineps/data/Times_Italic.c
+1
-2
Times_Roman.c
dlls/wineps/data/Times_Roman.c
+1
-2
ZapfChancery_MediumItalic.c
dlls/wineps/data/ZapfChancery_MediumItalic.c
+1
-2
ZapfDingbats.c
dlls/wineps/data/ZapfDingbats.c
+0
-0
psdrv.h
dlls/wineps/psdrv.h
+0
-1
truetype.c
dlls/wineps/truetype.c
+3
-16
No files found.
dlls/wineps/afm.c
View file @
a9eae850
...
...
@@ -231,54 +231,6 @@ static BOOL PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp)
return
TRUE
;
}
/*******************************************************************************
* BuildEncoding
*
* Builds a custom encoding vector if necessary. Leaves vector in the same
* order as the afm->Metrics array; see SortFontMetrics().
*
*/
static
BOOL
BuildEncoding
(
AFM
*
afm
)
{
UNICODEVECTOR
*
uv
;
UNICODEGLYPH
*
ug
;
int
i
;
if
(
strcmp
(
afm
->
EncodingScheme
,
"FontSpecific"
)
!=
0
)
{
afm
->
Encoding
=
&
PSDRV_AdobeGlyphList
;
return
TRUE
;
}
uv
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
UNICODEVECTOR
)
+
afm
->
NumofMetrics
*
sizeof
(
UNICODEGLYPH
));
if
(
uv
==
NULL
)
return
FALSE
;
afm
->
Encoding
=
uv
;
ug
=
(
UNICODEGLYPH
*
)(
uv
+
1
);
uv
->
glyphs
=
ug
;
uv
->
size
=
afm
->
NumofMetrics
;
for
(
i
=
0
;
i
<
afm
->
NumofMetrics
;
++
i
)
{
ug
[
i
].
name
=
afm
->
Metrics
[
i
].
N
;
if
(
afm
->
Metrics
[
i
].
C
<
0
)
/* unencoded glyph */
{
WARN
(
"Glyph '%s' in font '%s' has no encoding
\n
"
,
ug
[
i
].
name
->
sz
,
afm
->
FullName
);
ug
[
i
].
UV
=
-
1
;
}
else
{
ug
[
i
].
UV
=
afm
->
Metrics
[
i
].
C
|
0xf000
;
/* private use area? */
}
}
return
TRUE
;
}
/***********************************************************
*
...
...
@@ -500,12 +452,6 @@ static AFM *PSDRV_AFMParse(char const *file)
if
(
afm
->
Weight
==
0
)
afm
->
Weight
=
FW_NORMAL
;
if
(
BuildEncoding
(
afm
)
==
FALSE
)
{
FreeAFM
(
afm
);
return
NULL
;
}
return
afm
;
}
...
...
@@ -698,11 +644,6 @@ static int UnicodeGlyphByNameIndex(const UNICODEGLYPH *a, const UNICODEGLYPH *b)
return
a
->
name
->
index
-
b
->
name
->
index
;
}
static
int
UnicodeGlyphByUV
(
const
UNICODEGLYPH
*
a
,
const
UNICODEGLYPH
*
b
)
{
return
a
->
UV
-
b
->
UV
;
}
static
int
AFMMetricsByUV
(
const
AFMMETRICS
*
a
,
const
AFMMETRICS
*
b
)
{
return
a
->
UV
-
b
->
UV
;
...
...
@@ -722,7 +663,7 @@ static BOOL SortFontMetrics()
AFM
*
afm
=
afmle
->
afm
;
/* should always be valid */
INT
i
;
if
(
afm
->
Encoding
==
&
PSDRV_AdobeGlyphList
)
if
(
strcmp
(
afm
->
EncodingScheme
,
"FontSpecific"
)
!=
0
)
{
if
(
aglCopy
==
NULL
)
/* do this once, if necessary */
{
...
...
@@ -761,22 +702,10 @@ static BOOL SortFontMetrics()
}
}
}
else
/* FontSpecific encoding or TrueType font
*/
else
/* FontSpecific encoding
*/
{
for
(
i
=
0
;
i
<
afm
->
NumofMetrics
;
++
i
)
afm
->
Metrics
[
i
].
UV
=
afm
->
Encoding
->
glyphs
[
i
].
UV
;
/* typecast avoids compiler warning */
qsort
((
void
*
)(
afm
->
Encoding
->
glyphs
),
afm
->
Encoding
->
size
,
sizeof
(
UNICODEGLYPH
),
(
compar_callback_fn
)
UnicodeGlyphByUV
);
for
(
i
=
0
;
i
<
afm
->
Encoding
->
size
;
++
i
)
if
(
afm
->
Encoding
->
glyphs
[
i
].
UV
>=
0
)
break
;
afm
->
Encoding
->
size
-=
i
;
/* Ignore unencoded glyphs */
afm
->
Encoding
->
glyphs
+=
i
;
/* from now on */
afm
->
Metrics
[
i
].
UV
=
afm
->
Metrics
[
i
].
C
;
}
qsort
(
afm
->
Metrics
,
afm
->
NumofMetrics
,
sizeof
(
AFMMETRICS
),
...
...
@@ -786,7 +715,7 @@ static BOOL SortFontMetrics()
if
(
afm
->
Metrics
[
i
].
UV
>=
0
)
break
;
afm
->
NumofMetrics
-=
i
;
/* Ignore unencoded glyphs here too
*/
afm
->
NumofMetrics
-=
i
;
/* Ignore unencoded glyphs
*/
afm
->
Metrics
+=
i
;
afmle
=
afmle
->
next
;
...
...
dlls/wineps/data/AvantGarde_Book.c
View file @
a9eae850
...
...
@@ -1014,6 +1014,5 @@ AFM PSDRV_AvantGarde_Book =
0
/* CharWidths[255] */
},
228
,
/* NumofMetrics */
met_AvantGarde_Book
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_AvantGarde_Book
/* Metrics */
};
dlls/wineps/data/AvantGarde_BookOblique.c
View file @
a9eae850
...
...
@@ -1014,6 +1014,5 @@ AFM PSDRV_AvantGarde_BookOblique =
0
/* CharWidths[255] */
},
228
,
/* NumofMetrics */
met_AvantGarde_BookOblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_AvantGarde_BookOblique
/* Metrics */
};
dlls/wineps/data/AvantGarde_Demi.c
View file @
a9eae850
...
...
@@ -1014,6 +1014,5 @@ AFM PSDRV_AvantGarde_Demi =
0
/* CharWidths[255] */
},
228
,
/* NumofMetrics */
met_AvantGarde_Demi
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_AvantGarde_Demi
/* Metrics */
};
dlls/wineps/data/AvantGarde_DemiOblique.c
View file @
a9eae850
...
...
@@ -1015,5 +1015,4 @@ AFM PSDRV_AvantGarde_DemiOblique =
},
228
,
/* NumofMetrics */
met_AvantGarde_DemiOblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
};
dlls/wineps/data/Bookman_Demi.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Bookman_Demi =
620
,
940
,
660
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Bookman_Demi
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Bookman_Demi
/* Metrics */
};
dlls/wineps/data/Bookman_DemiItalic.c
View file @
a9eae850
...
...
@@ -1014,6 +1014,5 @@ AFM PSDRV_Bookman_DemiItalic =
0
/* CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Bookman_DemiItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Bookman_DemiItalic
/* Metrics */
};
dlls/wineps/data/Bookman_Light.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Bookman_Light =
560
,
900
,
660
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Bookman_Light
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Bookman_Light
/* Metrics */
};
dlls/wineps/data/Bookman_LightItalic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Bookman_LightItalic =
540
,
900
,
620
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Bookman_LightItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Bookman_LightItalic
/* Metrics */
};
dlls/wineps/data/Courier.c
View file @
a9eae850
...
...
@@ -1073,6 +1073,5 @@ AFM PSDRV_Courier =
600
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
243
,
/* NumofMetrics */
met_Courier
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Courier
/* Metrics */
};
dlls/wineps/data/Courier_Bold.c
View file @
a9eae850
...
...
@@ -1073,6 +1073,5 @@ AFM PSDRV_Courier_Bold =
600
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
243
,
/* NumofMetrics */
met_Courier_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Courier_Bold
/* Metrics */
};
dlls/wineps/data/Courier_BoldOblique.c
View file @
a9eae850
...
...
@@ -1073,6 +1073,5 @@ AFM PSDRV_Courier_BoldOblique =
600
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
243
,
/* NumofMetrics */
met_Courier_BoldOblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Courier_BoldOblique
/* Metrics */
};
dlls/wineps/data/Courier_Oblique.c
View file @
a9eae850
...
...
@@ -1073,6 +1073,5 @@ AFM PSDRV_Courier_Oblique =
600
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
243
,
/* NumofMetrics */
met_Courier_Oblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Courier_Oblique
/* Metrics */
};
dlls/wineps/data/Helvetica.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica =
611
,
944
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica
/* Metrics */
};
dlls/wineps/data/Helvetica_Bold.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Bold =
611
,
944
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Bold
/* Metrics */
};
dlls/wineps/data/Helvetica_BoldOblique.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_BoldOblique =
611
,
944
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_BoldOblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_BoldOblique
/* Metrics */
};
dlls/wineps/data/Helvetica_Narrow.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Narrow =
501
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Narrow
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Narrow
/* Metrics */
};
dlls/wineps/data/Helvetica_Narrow_Bold.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Narrow_Bold =
501
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Narrow_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Narrow_Bold
/* Metrics */
};
dlls/wineps/data/Helvetica_Narrow_BoldOblique.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Narrow_BoldOblique =
501
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Narrow_BoldOblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Narrow_BoldOblique
/* Metrics */
};
dlls/wineps/data/Helvetica_Narrow_Oblique.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Narrow_Oblique =
501
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Narrow_Oblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Narrow_Oblique
/* Metrics */
};
dlls/wineps/data/Helvetica_Oblique.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Helvetica_Oblique =
611
,
944
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Helvetica_Oblique
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Helvetica_Oblique
/* Metrics */
};
dlls/wineps/data/NewCenturySchlbk_Bold.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_NewCenturySchlbk_Bold =
611
,
907
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_NewCenturySchlbk_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_NewCenturySchlbk_Bold
/* Metrics */
};
dlls/wineps/data/NewCenturySchlbk_BoldItalic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_NewCenturySchlbk_BoldItalic =
574
,
852
,
574
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_NewCenturySchlbk_BoldItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_NewCenturySchlbk_BoldItalic
/* Metrics */
};
dlls/wineps/data/NewCenturySchlbk_Italic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_NewCenturySchlbk_Italic =
500
,
778
,
556
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_NewCenturySchlbk_Italic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_NewCenturySchlbk_Italic
/* Metrics */
};
dlls/wineps/data/NewCenturySchlbk_Roman.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_NewCenturySchlbk_Roman =
500
,
833
,
574
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_NewCenturySchlbk_Roman
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_NewCenturySchlbk_Roman
/* Metrics */
};
dlls/wineps/data/Palatino_Bold.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Palatino_Bold =
556
,
833
,
611
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Palatino_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Palatino_Bold
/* Metrics */
};
dlls/wineps/data/Palatino_BoldItalic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Palatino_BoldItalic =
556
,
778
,
556
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Palatino_BoldItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Palatino_BoldItalic
/* Metrics */
};
dlls/wineps/data/Palatino_Italic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Palatino_Italic =
444
,
669
,
500
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Palatino_Italic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Palatino_Italic
/* Metrics */
};
dlls/wineps/data/Palatino_Roman.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Palatino_Roman =
556
,
827
,
556
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Palatino_Roman
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Palatino_Roman
/* Metrics */
};
dlls/wineps/data/Symbol.c
View file @
a9eae850
This diff is collapsed.
Click to expand it.
dlls/wineps/data/Times_Bold.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Times_Bold =
500
,
722
,
556
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Times_Bold
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Times_Bold
/* Metrics */
};
dlls/wineps/data/Times_BoldItalic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Times_BoldItalic =
500
,
722
,
500
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Times_BoldItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Times_BoldItalic
/* Metrics */
};
dlls/wineps/data/Times_Italic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Times_Italic =
500
,
0
,
0
,
0
,
0
/* CharWidths[251] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Times_Italic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Times_Italic
/* Metrics */
};
dlls/wineps/data/Times_Roman.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_Times_Roman =
500
,
722
,
500
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_Times_Roman
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_Times_Roman
/* Metrics */
};
dlls/wineps/data/ZapfChancery_MediumItalic.c
View file @
a9eae850
...
...
@@ -1013,6 +1013,5 @@ AFM PSDRV_ZapfChancery_MediumItalic =
440
,
560
,
420
,
0
,
0
,
0
,
0
/* CharWidths[249] - CharWidths[255] */
},
228
,
/* NumofMetrics */
met_ZapfChancery_MediumItalic
,
/* Metrics */
&
PSDRV_AdobeGlyphList
/* Encoding */
met_ZapfChancery_MediumItalic
/* Metrics */
};
dlls/wineps/data/ZapfDingbats.c
View file @
a9eae850
This diff is collapsed.
Click to expand it.
dlls/wineps/psdrv.h
View file @
a9eae850
...
...
@@ -85,7 +85,6 @@ typedef struct _tagAFM {
float
CharWidths
[
256
];
int
NumofMetrics
;
AFMMETRICS
*
Metrics
;
UNICODEVECTOR
*
Encoding
;
}
AFM
;
/* CharWidths is a shortcut to the WX values of numbered glyphs */
/* Note no 'next' in AFM. Use AFMLISTENTRY as a container. This allow more than
...
...
dlls/wineps/truetype.c
View file @
a9eae850
...
...
@@ -267,8 +267,6 @@ static void FreeAFM(AFM *afm)
HeapFree
(
PSDRV_Heap
,
0
,
afm
->
EncodingScheme
);
if
(
afm
->
Metrics
!=
NULL
)
HeapFree
(
PSDRV_Heap
,
0
,
afm
->
Metrics
);
if
(
afm
->
Encoding
!=
NULL
)
HeapFree
(
PSDRV_Heap
,
0
,
afm
->
Encoding
);
HeapFree
(
PSDRV_Heap
,
0
,
afm
);
}
...
...
@@ -339,14 +337,12 @@ static BOOL ReadMetricsTables(AFM *afm)
*
* Reads metrics for each glyph in a TrueType font. Since FreeAFM will try to
* free afm->Metrics and afm->Encoding if they are non-NULL, don't free them
* in the event of an error. (FreeAFM depends on the fact that afm->Encoding
* and its associated array of UNICODEGLYPHs are allocated as a single object.)
* in the event of an error.
*
*/
static
BOOL
ReadCharMetrics
(
AFM
*
afm
)
{
FT_ULong
charcode
,
index
;
UNICODEGLYPH
*
glyphs
;
/*
* There does not seem to be an easy way to get the number of characters
...
...
@@ -361,15 +357,9 @@ static BOOL ReadCharMetrics(AFM *afm)
afm
->
NumofMetrics
=
index
;
afm
->
Metrics
=
HeapAlloc
(
PSDRV_Heap
,
0
,
index
*
sizeof
(
AFMMETRICS
));
afm
->
Encoding
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
UNICODEVECTOR
)
+
index
*
sizeof
(
UNICODEGLYPH
));
if
(
afm
->
Metrics
==
NULL
||
afm
->
Encoding
==
NULL
)
if
(
afm
->
Metrics
==
NULL
)
return
FALSE
;
glyphs
=
(
UNICODEGLYPH
*
)(
afm
->
Encoding
+
1
);
afm
->
Encoding
->
size
=
index
;
afm
->
Encoding
->
glyphs
=
glyphs
;
for
(
charcode
=
0
,
index
=
0
;
charcode
<=
65536
;
++
charcode
)
{
FT_UInt
glyph_index
=
FT_Get_Char_Index
(
face
,
charcode
);
...
...
@@ -423,9 +413,6 @@ static BOOL ReadCharMetrics(AFM *afm)
afm
->
Metrics
[
index
].
B
.
llx
,
afm
->
Metrics
[
index
].
B
.
lly
,
afm
->
Metrics
[
index
].
B
.
urx
,
afm
->
Metrics
[
index
].
B
.
ury
);
glyphs
[
index
].
UV
=
charcode
;
glyphs
[
index
].
name
=
afm
->
Metrics
[
index
].
N
;
if
(
charcode
==
0x0048
)
/* 'H' */
afm
->
CapHeight
=
PSUnits
(
bbox
.
yMax
);
if
(
charcode
==
0x0078
)
/* 'x' */
...
...
@@ -535,7 +522,7 @@ static BOOL ReadTrueTypeFile(LPCSTR filename)
return
FALSE
;
}
if
(
afm
->
Encoding
==
NULL
)
/* last element to be set */
if
(
afm
->
Metrics
==
NULL
)
/* last element to be set */
{
FreeAFM
(
afm
);
return
TRUE
;
...
...
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