freetype/truetype: handle control value cut-in in MIRP.
The difference is quite large on glyph 509 (period character) of Adobe Source Sans Pro Bold Italic. R=golang-dev, nigeltao, bsiegert CC=golang-dev https://codereview.appspot.com/16820043 Committer: Nigel Tao <nigeltao@golang.org>
This commit is contained in:
parent
5ac614f802
commit
486e1683dd
1 changed files with 5 additions and 1 deletions
|
@ -1023,7 +1023,11 @@ func (h *Hinter) run(program []byte, pCurrent, pUnhinted, pInFontUnits []Point,
|
|||
// TODO: metrics compensation.
|
||||
distance := cvtDist
|
||||
if opcode&0x04 != 0 {
|
||||
distance = h.round(cvtDist)
|
||||
// The CVT value is only used if close enough to oldDist.
|
||||
if (cvtDist - oldDist).abs() > h.gs.controlValueCutIn {
|
||||
distance = oldDist
|
||||
}
|
||||
distance = h.round(distance)
|
||||
}
|
||||
|
||||
// Minimum distance bit.
|
||||
|
|
Loading…
Reference in a new issue