summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2022-02-12 23:42:08 -0500
committerAlexei Podtelezhnikov <apodtele@gmail.com>2022-02-12 23:42:08 -0500
commit00ae29fcd26a3425db5b3f15793796cb6e958411 (patch)
tree5d97d7da5890faee059db17692303a2f8bcee288
parent5a53e51b5cabd17d6220f389c0266f52d2e5b362 (diff)
downloadfreetype2-00ae29fcd26a3425db5b3f15793796cb6e958411.tar.gz
[pshinter] Tune PSH_STRONG_THRESHOLD_MAXIMUM value.
Before the change, the hinting engine frequently confused horizontal stem and serif hints making some stems too thin and some serifs too thick. The value was tuned using serif fonts from the URW+ base 35 collection. * src/pshinter/pshalgo.c [PSH_STRONG_THRESHOLD_MAXIMUM]: s/30/12/.
-rw-r--r--src/pshinter/pshalgo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index a237f6c41..dca539766 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1548,8 +1548,9 @@
/* the accepted shift for strong points in fractional pixels */
#define PSH_STRONG_THRESHOLD 32
- /* the maximum shift value in font units */
-#define PSH_STRONG_THRESHOLD_MAXIMUM 30
+ /* the maximum shift value in font units tuned to distinguish */
+ /* between stems and serifs in URW+ font collection */
+#define PSH_STRONG_THRESHOLD_MAXIMUM 12
/* find strong points in a glyph */