diff options
author | Peter Volkov <pva@gentoo.org> | 2008-06-20 10:11:03 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-06-20 10:11:03 +0000 |
commit | 70a0ded4453fe71560c79e3f08f3aeb20ce199fc (patch) | |
tree | f25a3b22f64e275e4090b37f678c5b85b7a4bc5a | |
parent | Changed rb_libtorrent dependency to =0.12* (diff) | |
download | historical-70a0ded4453fe71560c79e3f08f3aeb20ce199fc.tar.gz historical-70a0ded4453fe71560c79e3f08f3aeb20ce199fc.tar.bz2 historical-70a0ded4453fe71560c79e3f08f3aeb20ce199fc.zip |
Fix incorrent size of rendered fonts, bug #228095, thank Jacob for report and Werner Lemberg for the fix.
Package-Manager: portage-2.1.4.4
-rw-r--r-- | media-libs/freetype/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/freetype/files/freetype-2.3.6-incorect-font-scaling.patch | 252 | ||||
-rw-r--r-- | media-libs/freetype/freetype-2.3.6-r1.ebuild | 118 | ||||
-rw-r--r-- | media-libs/spandsp/Manifest | 8 |
4 files changed, 383 insertions, 5 deletions
diff --git a/media-libs/freetype/ChangeLog b/media-libs/freetype/ChangeLog index 089d0e563467..368f7a8aa975 100644 --- a/media-libs/freetype/ChangeLog +++ b/media-libs/freetype/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-libs/freetype # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/freetype/ChangeLog,v 1.186 2008/06/13 15:15:53 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/freetype/ChangeLog,v 1.187 2008/06/20 10:11:02 pva Exp $ + +*freetype-2.3.6-r1 (20 Jun 2008) + + 20 Jun 2008; Peter Volkov <pva@gentoo.org> + +files/freetype-2.3.6-incorect-font-scaling.patch, + +freetype-2.3.6-r1.ebuild: + Fix incorrent size of rendered fonts, bug #228095, thank Jacob for report + and Werner Lemberg for the fix. 13 Jun 2008; Tobias Scherbaum <dertobi123@gentoo.org> freetype-2.3.6.ebuild: diff --git a/media-libs/freetype/files/freetype-2.3.6-incorect-font-scaling.patch b/media-libs/freetype/files/freetype-2.3.6-incorect-font-scaling.patch new file mode 100644 index 000000000000..0688bbebaf90 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.3.6-incorect-font-scaling.patch @@ -0,0 +1,252 @@ +2008-06-19 Werner Lemberg <wl@gnu.org> + + * src/cff/cffobjs.c (cff_face_init): Compute final + `dict->units_per_em' value before assigning it to + `cffface->units_per_EM'. Otherwise, CFFs without subfonts are be + scaled incorrectly if the font matrix is non-standard. This fixes + Savannah bug #23630. + +Index: src/cff/cffobjs.c +=================================================================== +RCS file: /sources/freetype/freetype2/src/cff/cffobjs.c,v +retrieving revision 1.89 +retrieving revision 1.90 +diff -u -B -r1.89 -r1.90 +--- src/cff/cffobjs.c 14 May 2008 23:05:37 -0000 1.89 ++++ src/cff/cffobjs.c 19 Jun 2008 16:23:43 -0000 1.90 +@@ -534,6 +534,111 @@ + goto Bad_Format; + } + ++ if ( !dict->units_per_em ) ++ dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM; ++ ++ /* Normalize the font matrix so that `matrix->xx' is 1; the */ ++ /* scaling is done with `units_per_em' then (at this point, */ ++ /* it already contains the scaling factor, but without */ ++ /* normalization of the matrix). */ ++ /* */ ++ /* Note that the offsets must be expressed in integer font */ ++ /* units. */ ++ ++ { ++ FT_Matrix* matrix = &dict->font_matrix; ++ FT_Vector* offset = &dict->font_offset; ++ FT_ULong* upm = &dict->units_per_em; ++ FT_Fixed temp = FT_ABS( matrix->yy ); ++ ++ ++ if ( temp != 0x10000L ) ++ { ++ *upm = FT_DivFix( *upm, temp ); ++ ++ matrix->xx = FT_DivFix( matrix->xx, temp ); ++ matrix->yx = FT_DivFix( matrix->yx, temp ); ++ matrix->xy = FT_DivFix( matrix->xy, temp ); ++ matrix->yy = FT_DivFix( matrix->yy, temp ); ++ offset->x = FT_DivFix( offset->x, temp ); ++ offset->y = FT_DivFix( offset->y, temp ); ++ } ++ ++ offset->x >>= 16; ++ offset->y >>= 16; ++ } ++ ++ for ( i = cff->num_subfonts; i > 0; i-- ) ++ { ++ CFF_FontRecDict sub = &cff->subfonts[i - 1]->font_dict; ++ CFF_FontRecDict top = &cff->top_font.font_dict; ++ ++ FT_Matrix* matrix; ++ FT_Vector* offset; ++ FT_ULong* upm; ++ FT_Fixed temp; ++ ++ ++ if ( sub->units_per_em ) ++ { ++ FT_Int scaling; ++ ++ ++ if ( top->units_per_em > 1 && sub->units_per_em > 1 ) ++ scaling = FT_MIN( top->units_per_em, sub->units_per_em ); ++ else ++ scaling = 1; ++ ++ FT_Matrix_Multiply_Scaled( &top->font_matrix, ++ &sub->font_matrix, ++ scaling ); ++ FT_Vector_Transform_Scaled( &sub->font_offset, ++ &top->font_matrix, ++ scaling ); ++ ++ sub->units_per_em = FT_MulDiv( sub->units_per_em, ++ top->units_per_em, ++ scaling ); ++ } ++ else ++ { ++ sub->font_matrix = top->font_matrix; ++ sub->font_offset = top->font_offset; ++ ++ sub->units_per_em = top->units_per_em; ++ } ++ ++ matrix = &sub->font_matrix; ++ offset = &sub->font_offset; ++ upm = &sub->units_per_em; ++ temp = FT_ABS( matrix->yy ); ++ ++ if ( temp != 0x10000L ) ++ { ++ *upm = FT_DivFix( *upm, temp ); ++ ++ /* if *upm is larger than 100*1000 we divide by 1000 -- */ ++ /* this can happen if e.g. there is no top-font FontMatrix */ ++ /* and the subfont FontMatrix already contains the complete */ ++ /* scaling for the subfont (see section 5.11 of the PLRM) */ ++ ++ /* 100 is a heuristic value */ ++ ++ if ( *upm > 100L * 1000L ) ++ *upm = ( *upm + 500 ) / 1000; ++ ++ matrix->xx = FT_DivFix( matrix->xx, temp ); ++ matrix->yx = FT_DivFix( matrix->yx, temp ); ++ matrix->xy = FT_DivFix( matrix->xy, temp ); ++ matrix->yy = FT_DivFix( matrix->yy, temp ); ++ offset->x = FT_DivFix( offset->x, temp ); ++ offset->y = FT_DivFix( offset->y, temp ); ++ } ++ ++ offset->x >>= 16; ++ offset->y >>= 16; ++ } ++ + if ( pure_cff ) + { + char* style_name = NULL; +@@ -554,8 +659,6 @@ + cffface->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFFU ) >> 16; + cffface->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFFU ) >> 16; + +- if ( !dict->units_per_em ) +- dict->units_per_em = 1000; + + cffface->units_per_EM = dict->units_per_em; + +@@ -711,114 +814,8 @@ + + cffface->style_flags = flags; + } +- else +- { +- if ( !dict->units_per_em ) +- dict->units_per_em = face->root.units_per_EM; +- } +- +- /* Normalize the font matrix so that `matrix->xx' is 1; the */ +- /* scaling is done with `units_per_em' then (at this point, */ +- /* it already contains the scaling factor, but without */ +- /* normalization of the matrix). */ +- /* */ +- /* Note that the offsets must be expressed in integer font */ +- /* units. */ +- +- { +- FT_Matrix* matrix = &dict->font_matrix; +- FT_Vector* offset = &dict->font_offset; +- FT_ULong* upm = &dict->units_per_em; +- FT_Fixed temp = FT_ABS( matrix->yy ); +- +- +- if ( temp != 0x10000L ) +- { +- *upm = FT_DivFix( *upm, temp ); +- +- matrix->xx = FT_DivFix( matrix->xx, temp ); +- matrix->yx = FT_DivFix( matrix->yx, temp ); +- matrix->xy = FT_DivFix( matrix->xy, temp ); +- matrix->yy = FT_DivFix( matrix->yy, temp ); +- offset->x = FT_DivFix( offset->x, temp ); +- offset->y = FT_DivFix( offset->y, temp ); +- } +- +- offset->x >>= 16; +- offset->y >>= 16; +- } +- +- for ( i = cff->num_subfonts; i > 0; i-- ) +- { +- CFF_FontRecDict sub = &cff->subfonts[i - 1]->font_dict; +- CFF_FontRecDict top = &cff->top_font.font_dict; +- +- FT_Matrix* matrix; +- FT_Vector* offset; +- FT_ULong* upm; +- FT_Fixed temp; + + +- if ( sub->units_per_em ) +- { +- FT_Int scaling; +- +- +- if ( top->units_per_em > 1 && sub->units_per_em > 1 ) +- scaling = FT_MIN( top->units_per_em, sub->units_per_em ); +- else +- scaling = 1; +- +- FT_Matrix_Multiply_Scaled( &top->font_matrix, +- &sub->font_matrix, +- scaling ); +- FT_Vector_Transform_Scaled( &sub->font_offset, +- &top->font_matrix, +- scaling ); +- +- sub->units_per_em = FT_MulDiv( sub->units_per_em, +- top->units_per_em, +- scaling ); +- } +- else +- { +- sub->font_matrix = top->font_matrix; +- sub->font_offset = top->font_offset; +- +- sub->units_per_em = top->units_per_em; +- } +- +- matrix = &sub->font_matrix; +- offset = &sub->font_offset; +- upm = &sub->units_per_em; +- temp = FT_ABS( matrix->yy ); +- +- if ( temp != 0x10000L ) +- { +- *upm = FT_DivFix( *upm, temp ); +- +- /* if *upm is larger than 100*1000 we divide by 1000 -- */ +- /* this can happen if e.g. there is no top-font FontMatrix */ +- /* and the subfont FontMatrix already contains the complete */ +- /* scaling for the subfont (see section 5.11 of the PLRM) */ +- +- /* 100 is a heuristic value */ +- +- if ( *upm > 100L * 1000L ) +- *upm = ( *upm + 500 ) / 1000; +- +- matrix->xx = FT_DivFix( matrix->xx, temp ); +- matrix->yx = FT_DivFix( matrix->yx, temp ); +- matrix->xy = FT_DivFix( matrix->xy, temp ); +- matrix->yy = FT_DivFix( matrix->yy, temp ); +- offset->x = FT_DivFix( offset->x, temp ); +- offset->y = FT_DivFix( offset->y, temp ); +- } +- +- offset->x >>= 16; +- offset->y >>= 16; +- } +- + #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES + /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */ + /* has unset this flag because of the 3.0 `post' table. */ diff --git a/media-libs/freetype/freetype-2.3.6-r1.ebuild b/media-libs/freetype/freetype-2.3.6-r1.ebuild new file mode 100644 index 000000000000..a1a1b57b90fd --- /dev/null +++ b/media-libs/freetype/freetype-2.3.6-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/freetype/freetype-2.3.6-r1.ebuild,v 1.1 2008/06/20 10:11:02 pva Exp $ + +inherit eutils flag-o-matic libtool + +DESCRIPTION="A high-quality and portable font engine" +HOMEPAGE="http://www.freetype.org/" +SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2 ) + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2 )" + +LICENSE="FTL GPL-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="X bindist debug doc utils" + +DEPEND="X? ( x11-libs/libX11 + x11-libs/libXau + x11-libs/libXdmcp )" + +# We also need a recent fontconfig version to prevent segfaults. #166029 +# July 3 2007 dirtyepic +RDEPEND="${DEPEND} + !<media-libs/fontconfig-2.3.2-r2" + +src_unpack() { + unpack ${A} + cd "${S}" + + enable_option() { + sed -i -e "/#define $1/a #define $1" \ + include/freetype/config/ftoption.h \ + || die "unable to enable option $1" + } + + disable_option() { + sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \ + include/freetype/config/ftoption.h \ + || die "unable to disable option $1" + } + + if ! use bindist; then + # Bytecodes and subpixel hinting supports are patented + # in United States; for safety, disable them while building + # binaries, so that no risky code is distributed. + # See http://freetype.org/patents.html + + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING + enable_option TT_CONFIG_OPTION_BYTECODE_INTERPRETER + disable_option TT_CONFIG_OPTION_UNPATENTED_HINTING + fi + + if use debug; then + enable_option FT_DEBUG_LEVEL_ERROR + enable_option FT_DEBUG_MEMORY + fi + + enable_option FT_CONFIG_OPTION_INCREMENTAL + disable_option FT_CONFIG_OPTION_OLD_INTERNALS + + epatch "${FILESDIR}"/${PN}-2.3.2-enable-valid.patch + epatch "${FILESDIR}"/${P}-incorect-font-scaling.patch + + if use utils; then + cd "${WORKDIR}"/ft2demos-${PV} + sed -i -e "s:\.\.\/freetype2$:../freetype-${PV}:" Makefile + + # Disable tests needing X11 when USE="-X". (bug #177597) + if ! use X; then + sed -i -e "/EXES\ +=\ ftview/ s:^:#:" Makefile + fi + fi + + elibtoolize + epunt_cxx +} + +src_compile() { + append-flags -fno-strict-aliasing + + type -P gmake &> /dev/null && export GNUMAKE=gmake + econf || die "econf failed" + emake || die "emake failed" + + if use utils; then + cd "${WORKDIR}"/ft2demos-${PV} + emake || die "ft2demos emake failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc ChangeLog README + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,*.txt,PATENTS,TODO} + + use doc && dohtml -r docs/* + + if use utils; then + rm "${WORKDIR}"/ft2demos-${PV}/bin/README + for ft2demo in ../ft2demos-${PV}/bin/*; do + ./builds/unix/libtool --mode=install $(type -P install) -m 755 "$ft2demo" \ + "${D}"/usr/bin + done + fi +} + +pkg_postinst() { + echo + ewarn "After upgrading to freetype-2.3.5, it is necessary to rebuild" + ewarn "libXfont to avoid build errors in some packages." + echo + elog "The utilities and demos previously bundled with freetype are now" + elog "optional. Enable the utils USE flag if you would like them" + elog "to be installed." + echo +} diff --git a/media-libs/spandsp/Manifest b/media-libs/spandsp/Manifest index 26c35ee437dc..e42777a8be21 100644 --- a/media-libs/spandsp/Manifest +++ b/media-libs/spandsp/Manifest @@ -2,9 +2,9 @@ DIST spandsp-0.0.2pre25.tar.gz 1467846 RMD160 c5f8b9688f477868fb746244c3b953e388 DIST spandsp-0.0.2pre26.tar.gz 1417752 RMD160 73de8b027888b49cf43c01b438bca1e52bd07e71 SHA1 5553624d3d5fcaeabb724e282cdea29dad8a6dea SHA256 57ac136a61974eb6c8cfd81bab14a514a04a3be8c513cc1682524ec4082d0fc8 DIST spandsp-0.0.3pre26.tgz 1586342 RMD160 052a7c9ab5265be4dcd8e01ec89c190a00075412 SHA1 36a26942b2a791f56b397eaad765643424bef450 SHA256 53510486a4d125a68301dbd8c1400f33149f3ac0fea0821d88f8fb485d35beab DIST spandsp-0.0.5pre4.tgz 2506742 RMD160 880c9d9f3a1dc42c3ef121181b8f6343176db59b SHA1 1b63ea56d7826c68f5febf811ca24b6d5a8a30f9 SHA256 07f42a237c77b08fa765c3a148c83cdfa267bf24c0ab681d80b90d30dd0b3dbf -EBUILD spandsp-0.0.2_pre25.ebuild 639 RMD160 386fad018eed6a31d3529056a304501898ab7b88 SHA1 48af653340621977d065cf43962a210547c9ec25 SHA256 e3ec4157363faf76a8c1e81e27ab283e5eca42f461dc2fc7fe8157d807eb204a -EBUILD spandsp-0.0.2_pre26.ebuild 639 RMD160 d73a9feed2819e1829a5b815377d2ffeab0454ed SHA1 e5d866d6c0b91bc5cdcc041824730d058d41faee SHA256 9e4cef61483accf03e8cb88c8faa5d23579d934fbabb0c412879c7c99c14b6d2 +EBUILD spandsp-0.0.2_pre25.ebuild 635 RMD160 afbdc769badf26fe076b75fc18232ed6fdb9a3ac SHA1 28fd054a5466fb3213fd111306de1f3c2a54f4b3 SHA256 1bdf439ab5fc389152e16eafd1ce022dbc023c59c28a8d89f655fe349543bf8e +EBUILD spandsp-0.0.2_pre26.ebuild 635 RMD160 fa57e73fa4df5b3c0cf631702feac7a00f06d3c0 SHA1 768cdfe8a222ee64eaedbb8bad5e659a59cb8bd9 SHA256 cb3754f232f418a92d3132cf6f386f46918869f74de2b23550859d9140dd856d EBUILD spandsp-0.0.3_pre26.ebuild 731 RMD160 5bf63edc9f0c2a03e943cc3f553341be2fb1e5e6 SHA1 85b4e419c2fb371e163f70f1ef1ca816c58b7ee0 SHA256 23360272204499168c47022983913153ae1db34406159e59181536e2684cdd5a -EBUILD spandsp-0.0.5_pre4.ebuild 1063 RMD160 1172fb01bcb2d194271fca69de50946ce7ff6dac SHA1 171270dbe9a60c587baeff2de06c60fb40242ae7 SHA256 b6ace349dce14e77806b3ed80652eb416b19091750d49ac4f284eee081fe2669 -MISC ChangeLog 2189 RMD160 3f1ef761fa9dd609d01c4fe25fe86a04d49dd2c6 SHA1 d0e9642fd35b6bcb7c9d4091065f294a38bd5688 SHA256 6bb697c2d92ed3303be013754000b55452b706ca2d5a251e76b49721a84b6457 +EBUILD spandsp-0.0.5_pre4.ebuild 1167 RMD160 d4c9818b3f733cd4f2330add1e143e51abc116e5 SHA1 89d583cc9b17eb5c9c58900983f816d9bc7c961e SHA256 0fc81a6e2efb5a229683bc4fdf33cb30f3438be95e62c1e956e25132e4b46586 +MISC ChangeLog 2187 RMD160 361fffb97a7a07535e8b8e8c31119cfab5332f34 SHA1 397361f396ba161668b68f135a107947ed8fb47f SHA256 b3060bc5e2f5b3eb4f079f4aa7438b171c206d5d9c8cc2dccae01e144ca78fee MISC metadata.xml 158 RMD160 f5c5c65907d35899e68d87a191b33893dc9bb5c8 SHA1 d60eb46c4a46eb607b922e357680d504a6aab76b SHA256 337dd5d16a30955fa88db27e322ebadb45ebf9534848b0fc31200c0e4b988d19 |