You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.8 KiB
59 lines
1.8 KiB
Index: src/dvi.c
|
|
===================================================================
|
|
--- src/dvi.c (revision 92)
|
|
+++ src/dvi.c (revision 93)
|
|
@@ -1901,6 +1901,9 @@
|
|
}
|
|
}
|
|
|
|
+/* globals initialized by fontmap.c when it opens freetype */
|
|
+extern FT_Int ft_major, ft_minor, ft_patch;
|
|
+
|
|
static void
|
|
do_glyph_array (int yLocsPresent)
|
|
{
|
|
@@ -1938,8 +1941,10 @@
|
|
glyph_id = get_buffered_unsigned_pair(); /* freetype glyph index */
|
|
if (glyph_id < font->ft_face->num_glyphs) {
|
|
if (font->glyph_widths[glyph_id] == 0xffff) {
|
|
- if (FT_IS_SFNT(font->ft_face)) {
|
|
- /* CFF driver of freetype does not set vertical metrics correctly,
|
|
+ if (FT_IS_SFNT(font->ft_face)
|
|
+ && ((ft_major < 2) || ((ft_major == 2) && (ft_minor < 2)))) {
|
|
+ /* prior to version 2.2.0,
|
|
+ CFF driver of freetype does not set vertical metrics correctly,
|
|
so we'll read the metrics directly */
|
|
TT_HoriHeader *dir_hea; /* vhea structure is identical */
|
|
dir_hea = FT_Get_Sfnt_Table(font->ft_face, (font->layout_dir == 0)
|
|
Index: src/fontmap.c
|
|
===================================================================
|
|
--- src/fontmap.c (revision 92)
|
|
+++ src/fontmap.c (revision 93)
|
|
@@ -1070,6 +1070,10 @@
|
|
return error;
|
|
}
|
|
|
|
+FT_Int ft_major; /* global so that dvi.c can check the version */
|
|
+FT_Int ft_minor;
|
|
+FT_Int ft_patch;
|
|
+
|
|
int
|
|
pdf_load_native_font (const char *ps_name,
|
|
const char *fam_name, const char *sty_name,
|
|
@@ -1085,6 +1089,7 @@
|
|
WARN("FreeType initialization failed.");
|
|
return error;
|
|
}
|
|
+ FT_Library_Version(ftLib, &ft_major, &ft_minor, &ft_patch);
|
|
sInitialized = 1;
|
|
}
|
|
|
|
@@ -1139,6 +1144,7 @@
|
|
WARN("FreeType initialization failed.");
|
|
return error;
|
|
}
|
|
+ FT_Library_Version(ftLib, &ft_major, &ft_minor, &ft_patch);
|
|
sInitialized = 1;
|
|
}
|
|
|