summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvipdfmx/src/dvi.c
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-01-19 18:06:16 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-01-19 18:06:16 +0000
commitd96e456867141854625c3f25653b26a71ac0ddfa (patch)
treea5f570e48bb2b6841d9a1cb231bd02fbc8813f00 /Build/source/texk/xdvipdfmx/src/dvi.c
parentab86c5998dd59cb60e7d7e89dd10bebe96bceeec (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/src/dvi.c')
-rw-r--r--Build/source/texk/xdvipdfmx/src/dvi.c29
1 files changed, 4 insertions, 25 deletions
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;