Skip to content

Commit e0b3138

Browse files
anntzermeeseeksmachine
authored andcommitted
Backport PR matplotlib#31608: Remove outdated comment re: implementation of hinting_factor.
1 parent 05ab664 commit e0b3138

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

src/ft2font.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,6 @@
1616
#define M_PI 3.14159265358979323846264338328
1717
#endif
1818

19-
/**
20-
To improve the hinting of the fonts, this code uses a hack
21-
presented here:
22-
23-
http://agg.sourceforge.net/antigrain.com/research/font_rasterization/index.html
24-
25-
The idea is to limit the effect of hinting in the x-direction, while
26-
preserving hinting in the y-direction. Since freetype does not
27-
support this directly, the dpi in the x-direction is set higher than
28-
in the y-direction, which affects the hinting grid. Then, a global
29-
transform is placed on the font to shrink it back to the desired
30-
size. While it is a bit surprising that the dpi setting affects
31-
hinting, whereas the global transform does not, this is documented
32-
behavior of FreeType, and therefore hopefully unlikely to change.
33-
The FreeType 2 tutorial says:
34-
35-
NOTE: The transformation is applied to every glyph that is
36-
loaded through FT_Load_Glyph and is completely independent of
37-
any hinting process. This means that you won't get the same
38-
results if you load a glyph at the size of 24 pixels, or a glyph
39-
at the size at 12 pixels scaled by 2 through a transform,
40-
because the hints will have been computed differently (except
41-
you have disabled hints).
42-
*/
43-
4419
FT_Library _ft2Library;
4520

4621
FT2Image::FT2Image(unsigned long width, unsigned long height)

0 commit comments

Comments
 (0)