diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-01-19 18:06:16 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-01-19 18:06:16 +0000 |
commit | d96e456867141854625c3f25653b26a71ac0ddfa (patch) | |
tree | a5f570e48bb2b6841d9a1cb231bd02fbc8813f00 /Build/source/texk/xdvipdfmx | |
parent | ab86c5998dd59cb60e7d7e89dd10bebe96bceeec (diff) |
Drop code for ancient FreeType 2.2.0
git-svn-id: svn://tug.org/texlive/trunk@28875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx')
-rw-r--r-- | Build/source/texk/xdvipdfmx/ChangeLog | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvi.c | 29 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/fontmap.c | 5 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/fontmap.h | 3 |
4 files changed, 7 insertions, 33 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog index 16c61d2d6d3..c4349cb173a 100644 --- a/Build/source/texk/xdvipdfmx/ChangeLog +++ b/Build/source/texk/xdvipdfmx/ChangeLog @@ -3,6 +3,9 @@ * src/dvi.c, src/dvicodes.h: Support DVI-IVD inspired text reflection for XeTeX. * src/vf.c: Adapt + * src/dvi.c: Drop code for ancient FreeType 2.2.0 + * src/fontmap.c, src/fontmap.h: Drip no longer use FreeType version + variables. 2013-01-11 Peter Breitenlohner <peb@mppmu.mpg.de> diff --git a/Build/source/texk/xdvipdfmx/src/dvi.c b/Build/source/texk/xdvipdfmx/src/dvi.c index 3b4b4608766..16db5f11da4 100644 --- a/Build/source/texk/xdvipdfmx/src/dvi.c +++ b/Build/source/texk/xdvipdfmx/src/dvi.c @@ -2128,31 +2128,10 @@ do_glyph_array (int yLocsPresent) 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) - && ((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) - ? ft_sfnt_hhea - : ft_sfnt_vhea); - if (dir_hea) { - FT_UShort *metrics = (FT_UShort*) dir_hea->long_metrics; - /* each metrics record is two shorts, advance and sidebearing */ - if (glyph_id < dir_hea->number_Of_HMetrics) - font->glyph_widths[glyph_id] = metrics[glyph_id * 2]; - else - font->glyph_widths[glyph_id] = metrics[2 * (dir_hea->number_Of_HMetrics - 1)]; - } else - font->glyph_widths[glyph_id] = 0; - } - else { - FT_Load_Glyph(font->ft_face, glyph_id, FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH); - font->glyph_widths[glyph_id] = (font->layout_dir == 0) - ? font->ft_face->glyph->metrics.horiAdvance - : font->ft_face->glyph->metrics.vertAdvance; - } + FT_Load_Glyph(font->ft_face, glyph_id, FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH); + font->glyph_widths[glyph_id] = (font->layout_dir == 0) + ? font->ft_face->glyph->metrics.horiAdvance + : font->ft_face->glyph->metrics.vertAdvance; } glyph_width = (double)font->size * (double)font->glyph_widths[glyph_id] / (double)font->ft_face->units_per_EM; glyph_width = glyph_width * font->extend; diff --git a/Build/source/texk/xdvipdfmx/src/fontmap.c b/Build/source/texk/xdvipdfmx/src/fontmap.c index 4a10717b071..035f0aacd9f 100644 --- a/Build/source/texk/xdvipdfmx/src/fontmap.c +++ b/Build/source/texk/xdvipdfmx/src/fontmap.c @@ -1150,10 +1150,6 @@ pdf_load_native_font_from_path(const char *ps_name, int layout_dir, int extend, 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, @@ -1167,7 +1163,6 @@ pdf_load_native_font (const char *ps_name, WARN("FreeType initialization failed."); return error; } - FT_Library_Version(ftLib, &ft_major, &ft_minor, &ft_patch); sInitialized = 1; } diff --git a/Build/source/texk/xdvipdfmx/src/fontmap.h b/Build/source/texk/xdvipdfmx/src/fontmap.h index 3de14d38c7b..2624e856c5d 100644 --- a/Build/source/texk/xdvipdfmx/src/fontmap.h +++ b/Build/source/texk/xdvipdfmx/src/fontmap.h @@ -40,9 +40,6 @@ #ifdef XETEX #include "ft2build.h" #include FT_FREETYPE_H - -/* globals initialized by fontmap.c when it opens freetype */ -extern FT_Int ft_major, ft_minor, ft_patch; #endif /* Options */ |