Round x-heights naturally instead of rounding up.
I think this matches what macOS does.
@@ -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);
}
}
