gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/FreetypeGlyphsProvider.cpp


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog server/FreetypeGlyphsProvider.cpp
Date: Mon, 05 Nov 2007 16:45:43 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   07/11/05 16:45:43

Modified files:
        .              : ChangeLog 
        server         : FreetypeGlyphsProvider.cpp 

Log message:
                * server/FreetypeGlyphsProvider.cpp: Pass bold and italic values
                  to fontconfig for system fonts. Fixes bug #20597.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4769&r2=1.4770
http://cvs.savannah.gnu.org/viewcvs/gnash/server/FreetypeGlyphsProvider.cpp?cvsroot=gnash&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4769
retrieving revision 1.4770
diff -u -b -r1.4769 -r1.4770
--- ChangeLog   5 Nov 2007 14:55:01 -0000       1.4769
+++ ChangeLog   5 Nov 2007 16:45:42 -0000       1.4770
@@ -1,3 +1,8 @@
+2007-11-05 Benjamin Wolsey <address@hidden>
+
+       * server/FreetypeGlyphsProvider.cpp: Pass bold and italic values
+         to fontconfig for system fonts. Fixes bug #20597. 
+
 2007-11-05 Udo Giacomozzi <address@hidden>
 
        * server/parser/shape_character_def.cpp: Implement a new point_test

Index: server/FreetypeGlyphsProvider.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/FreetypeGlyphsProvider.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/FreetypeGlyphsProvider.cpp   30 Oct 2007 18:55:42 -0000      1.14
+++ server/FreetypeGlyphsProvider.cpp   5 Nov 2007 16:45:43 -0000       1.15
@@ -233,8 +233,8 @@
 
 // private
 bool
-FreetypeGlyphsProvider::getFontFilename(const std::string& name,
-               bool /*bold*/, bool /*italic*/, std::string& filename)
+FreetypeGlyphsProvider::getFontFilename(const std::string &name,
+               bool bold, bool italic, std::string& filename)
 {
 
 #define DEFAULT_FONTFILE "/usr/share/fonts/truetype/freefont/FreeSans.ttf"
@@ -255,6 +255,15 @@
        FcPattern* pat = FcNameParse((const FcChar8*)name.c_str());
 
        FcConfigSubstitute (0, pat, FcMatchPattern);
+
+       if (italic) {
+               FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC);
+       }
+
+       if (bold) {
+               FcPatternAddInteger (pat, FC_WEIGHT, FC_WEIGHT_BOLD);
+       }
+
        FcDefaultSubstitute (pat);
 
        FcPattern   *match;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]