Adjust emboldening logic

Old logic was really bad.  If you requested weight=102 and got a medium
font (weight=100), it would still enable emboldening...

Adjust it to only embolden if request was >= bold and font was <= regular.
This commit is contained in:
Behdad Esfahbod 2017-09-15 14:28:12 -04:00
parent a79f367c3f
commit 9efe0689ae
1 changed files with 3 additions and 3 deletions

View File

@ -40,11 +40,11 @@
<match target="font">
<!-- check to see if the font is just regular -->
<test name="weight" compare="less_eq">
<const>medium</const>
<const>regular</const>
</test>
<!-- check to see if the pattern requests bold -->
<test target="pattern" name="weight" compare="more">
<const>medium</const>
<test target="pattern" name="weight" compare="more_eq">
<const>bold</const>
</test>
<!--
set the embolden flag