FreeBSD Bugzilla – Attachment 183978 Details for
Bug 219608
print/freetype2 produces incorrect line spacing for some fonts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch for print/freetype2 (since 441132)
freetype2.diff (text/plain), 4.35 KB, created by
lightside
on 2017-07-01 07:49:57 UTC
(
hide
)
Description:
Proposed patch for print/freetype2 (since 441132)
Filename:
MIME Type:
Creator:
lightside
Created:
2017-07-01 07:49:57 UTC
Size:
4.35 KB
patch
obsolete
>diff -ruNd freetype2.orig/Makefile freetype2/Makefile >--- freetype2.orig/Makefile 2017-05-18 08:46:06 UTC >+++ freetype2/Makefile >@@ -3,6 +3,7 @@ > > PORTNAME= freetype2 > PORTVERSION= 2.8 >+PORTREVISION= 1 > CATEGORIES= print > MASTER_SITES= http://savannah.nongnu.org/download/freetype/ \ > SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \ >@@ -36,10 +37,12 @@ > CPE_PRODUCT= freetype > CPE_VENDOR= freetype > >-OPTIONS_DEFINE= DEBUG DOCS LCD_FILTERING PNG TABLE_VALIDATION \ >- TT_SIZE_METRICS >+OPTIONS_DEFINE= DEBUG DOCS LCD_FILTERING LONG_PCF_NAMES PNG \ >+ TABLE_VALIDATION > OPTIONS_GROUP= SUBPIXEL_HINTING > OPTIONS_GROUP_SUBPIXEL_HINTING= V38 V40 >+OPTIONS_RADIO= SIZE_METRICS_CHOICE >+OPTIONS_RADIO_SIZE_METRICS_CHOICE= FIX_SIZE_METRICS TT_SIZE_METRICS > OPTIONS_DEFAULT= LCD_FILTERING V40 > > PNG_DESC= Png compressed OpenType embedded bitmaps support >@@ -48,11 +51,16 @@ > > TABLE_VALIDATION_DESC= TrueType GX/AAT and OpenType table validation > >-TT_SIZE_METRICS_DESC= TrueType-like size metrics for 'light' (V40) auto-hinting >+SIZE_METRICS_CHOICE_DESC= Size metrics for TrueType fonts >+FIX_SIZE_METRICS_DESC= Fix metrics on size request for scalable fonts (alternative method) >+FIX_SIZE_METRICS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-fix_size_metrics.diff >+TT_SIZE_METRICS_DESC= TrueType-like size metrics for 'light' auto-hinting > > LCD_FILTERING_DESC?= Sub-pixel rendering (patented) > LCD_FILTERING_CFLAGS= -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING > >+LONG_PCF_NAMES_DESC= Enable long PCF family names >+ > SUBPIXEL_HINTING_DESC= Sub-pixel hinting support > V38_DESC= v38 mode (Infinality code) > V38_VARS= SUBPIXEL_HINTING_MODE+=1 >@@ -90,6 +98,11 @@ > -e 's|.*\(#define FT_DEBUG_MEMORY\).*|\1|' \ > ${WRKSRC}/include/freetype/config/ftoption.h > >+post-patch-LONG_PCF_NAMES-on: >+ @${REINPLACE_CMD} -i '.names.bak' \ >+ -e 's|.*\(#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES\).*|\1|' \ >+ ${WRKSRC}/include/freetype/config/ftoption.h >+ > post-patch-TABLE_VALIDATION-on: > @${REINPLACE_CMD} -e '/valid$$/s|#.*\(AUX_MODULES\)|\1|' \ > ${WRKSRC}/modules.cfg >diff -ruNd freetype2.orig/files/extra-patch-fix_size_metrics.diff freetype2/files/extra-patch-fix_size_metrics.diff >--- freetype2.orig/files/extra-patch-fix_size_metrics.diff 1970-01-01 00:00:00 UTC >+++ freetype2/files/extra-patch-fix_size_metrics.diff >@@ -0,0 +1,48 @@ >+# Fix metrics on size request for scalable fonts. >+# Based on b0962ac34e66052ccfee7996e5468f30d4bd5a72 commit with changes for new version. >+# Reverts bcc74f4dafee25ea89f1d3144646cba7e30f9908 commit for src/truetype/ttdriver.c file. >+# Adapts 8ab08cff63eeb23b6c9f2c4470ae9809f2acf244 commit for src/truetype/ttobjs.c file. >+ >+--- src/truetype/ttdriver.c.orig 2017-04-29 04:38:17 UTC >++++ src/truetype/ttdriver.c >+@@ -357,6 +357,8 @@ >+ if ( FT_IS_SCALABLE( size->face ) ) >+ { >+ error = tt_size_reset( ttsize, 0 ); >++ if ( !error ) >++ ttsize->root.metrics = *ttsize->metrics; >+ >+ #ifdef TT_USE_BYTECODE_INTERPRETER >+ /* for the `MPS' bytecode instruction we need the point size */ >+--- src/truetype/ttobjs.c.orig 2017-05-07 11:05:56 UTC >++++ src/truetype/ttobjs.c >+@@ -1262,6 +1262,13 @@ >+ /* */ >+ if ( face->header.Flags & 8 ) >+ { >++ if ( !only_height ) >++ { >++ size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6, >++ face->root.units_per_EM ); >++ size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6, >++ face->root.units_per_EM ); >++ } >+ /* the TT spec always asks for ROUND, not FLOOR or CEIL */ >+ size_metrics->ascender = FT_PIX_ROUND( >+ FT_MulFix( face->root.ascender, >+@@ -1281,12 +1288,15 @@ >+ >+ if ( face->header.Flags & 8 ) >+ { >++ if ( only_height ) >++ { >+ /* base scaling values on integer ppem values, */ >+ /* as mandated by the TrueType specification */ >+ size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6, >+ face->root.units_per_EM ); >+ size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6, >+ face->root.units_per_EM ); >++ } >+ >+ size_metrics->max_advance = FT_PIX_ROUND( >+ FT_MulFix( face->root.max_advance_width,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219608
:
182981
|
182982
|
183227
|
183228
|
183237
|
183238
|
183250
|
183251
|
183254
|
183327
|
183976
|
183977
|
183978
|
183980
|
183981
|
183994
|
183995
|
183997
|
183998
|
184030