Round x-heights naturally instead of rounding up.
I think this matches what macOS does.
This commit is contained in:
parent
e5b76726d9
commit
997e9b852a
|
@ -302,9 +302,9 @@ export class Hint {
|
|||
this.hintedXHeight = this.xHeight;
|
||||
this.hintedStemHeight = this.stemHeight;
|
||||
} else {
|
||||
this.hintedXHeight = Math.ceil(Math.ceil(this.xHeight * pixelsPerUnit) /
|
||||
this.hintedXHeight = Math.round(Math.round(this.xHeight * pixelsPerUnit) /
|
||||
pixelsPerUnit);
|
||||
this.hintedStemHeight = Math.ceil(Math.ceil(this.stemHeight * pixelsPerUnit) /
|
||||
this.hintedStemHeight = Math.round(Math.round(this.stemHeight * pixelsPerUnit) /
|
||||
pixelsPerUnit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue