提交 1f97ea5d 编写于 作者: N Nigel Tao

freetype/truetype: apply the pp1x adjustment to the unhinted points

*before* hinting.

R=bsiegert
CC=golang-dev, remyoudompheng
https://codereview.appspot.com/35070044
上级 114d43ec
......@@ -394,7 +394,6 @@ func (g *GlyphBuf) addPhantomsAndScale(b Bounds, uhm HMetric, i Index, np0 int,
p.Y = g.font.scale(g.scale * p.Y)
}
if simple && g.hinter != nil {
g.Unhinted = append(g.Unhinted, g.Point[np0:]...)
// Round the 1st phantom point to the grid, shifting all other points equally.
pp1x := g.Point[len(g.Point)-4].X
if dx := ((pp1x + 32) &^ 63) - pp1x; dx != 0 {
......@@ -402,6 +401,7 @@ func (g *GlyphBuf) addPhantomsAndScale(b Bounds, uhm HMetric, i Index, np0 int,
g.Point[i].X += dx
}
}
g.Unhinted = append(g.Unhinted, g.Point[np0:]...)
}
// Round the 2nd and 4th phantom point to the grid.
p := &g.Point[len(g.Point)-3]
......
......@@ -255,7 +255,7 @@ var scalingTestCases = []struct {
hintingBrokenAt int
}{
{"luxisr", 12, -1},
{"x-arial-bold", 11, 130},
{"x-arial-bold", 11, 238},
{"x-deja-vu-sans-oblique", 17, -1},
{"x-droid-sans-japanese", 9, 0},
{"x-times-new-roman", 13, 0},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册