Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec63259

Browse files
committed
Fixing bug in font rendering -- the patented freetype hinter appears
to be unable to deal with the non-square hinting grid hack. [Forgot this file]. svn path=/trunk/matplotlib/; revision=4047
1 parent 253448d commit ec63259

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ft2font.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ FT2Font::set_text(const Py::Tuple & args, const Py::Dict & kwargs) {
943943

944944
angle = angle/360.0*2*3.14159;
945945

946-
long flags = FT_LOAD_DEFAULT;
946+
long flags = FT_LOAD_FORCE_AUTOHINT;
947947
if (kwargs.hasKey("flags"))
948948
flags = Py::Long(kwargs["flags"]);
949949

@@ -1054,7 +1054,7 @@ FT2Font::get_num_glyphs(const Py::Tuple & args){
10541054
}
10551055

10561056
char FT2Font::load_char__doc__[] =
1057-
"load_char(charcode, flags=LOAD_LOAD_DEFAULT)\n"
1057+
"load_char(charcode, flags=LOAD_FORCE_AUTOHINT)\n"
10581058
"\n"
10591059
"Load character with charcode in current fontfile and set glyph.\n"
10601060
"The flags argument can be a bitwise-or of the LOAD_XXX constants.\n"
@@ -1075,7 +1075,7 @@ FT2Font::load_char(const Py::Tuple & args, const Py::Dict & kwargs) {
10751075
//load a char using the unsigned long charcode
10761076

10771077
args.verify_length(1);
1078-
long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_DEFAULT);
1078+
long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_FORCE_AUTOHINT);
10791079
if (kwargs.hasKey("flags"))
10801080
flags = Py::Long(kwargs["flags"]);
10811081

0 commit comments

Comments
 (0)