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

Skip to content

Commit f14a022

Browse files
committed
Fix bug with SVG non-math text
svn path=/trunk/matplotlib/; revision=3682
1 parent 918cdea commit f14a022

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ft2font.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ FT2Font::get_kerning(const Py::Tuple & args) {
697697
FT_Vector delta;
698698

699699
if (!FT_Get_Kerning( face, left, right, mode, &delta )) {
700-
return Py::Int(delta.x);
700+
return Py::Int(delta.x / HORIZ_HINTING);
701701
}
702702
else {
703703
return Py::Int(0);
@@ -775,7 +775,7 @@ FT2Font::set_text(const Py::Tuple & args, const Py::Dict & kwargs) {
775775
FT_Vector delta;
776776
FT_Get_Kerning( face, previous, glyph_index,
777777
FT_KERNING_DEFAULT, &delta );
778-
pen.x += delta.x;
778+
pen.x += delta.x / HORIZ_HINTING;
779779
}
780780
error = FT_Load_Glyph( face, glyph_index, flags );
781781
if ( error ) {

0 commit comments

Comments
 (0)