diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 2 | ||||
| -rw-r--r-- | src/libnrtype/FontInstance.cpp | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index e160fc277..b2baeb2f0 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -634,6 +634,7 @@ void extract_openTypeTables(font_instance *res) { // Empty map... bitmap fonts seem to be loaded multiple times. res->openTypeTables.clear(); +#ifndef USE_PANGO_WIN32 auto const face = hb_ft_face_create(res->theFace, NULL); // First time to get size of array @@ -771,6 +772,7 @@ void extract_openTypeTables(font_instance *res) { hb_face_destroy (face); g_free(scripts_hb); +#endif // USE_PANGO_WIN32 } font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail) diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 7a16fc0c3..57aa22d48 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -556,10 +556,10 @@ bool font_instance::FontDecoration( double &underline_position, double &underl return false; } double scale=1.0/parent->fontSize; - underline_position = fabs(otm.otmUnderscorePosition *scale); - underline_thickness = fabs(otm.otmUnderscoreSize *scale); - linethrough_position = fabs(otm.otmStrikeoutPosition *scale); - linethrough_thickness = fabs(otm.otmStrikeoutSize *scale); + underline_position = fabs(otm.otmsUnderscorePosition *scale); + underline_thickness = fabs(otm.otmsUnderscoreSize *scale); + linethrough_position = fabs(otm.otmsStrikeoutPosition *scale); + linethrough_thickness = fabs(otm.otmsStrikeoutSize *scale); #else if ( theFace->units_per_EM == 0 ) { return false; // bitmap font @@ -683,12 +683,12 @@ void font_instance::FindFontMetrics() { if ( theFace ) { #ifdef USE_PANGO_WIN32 - + OUTLINETEXTMETRIC otm; if ( GetOutlineTextMetrics(parent->hScreenDC,sizeof(otm),&otm) ) { double scale=1.0/parent->fontSize; _ascent = fabs(otm.otmMacAscent * scale); _descent = fabs(otm.otmMacDescent * scale); - _xheight = fabs(otm.otmXHeight * scale); + _xheight = fabs(otm.otmsXHeight * scale); _ascent_max = fabs(otm.otmAscent * scale); _descent_max = fabs(otm.otmDescent * scale); |
