| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Should probably get a short API change note. |
Sorry, something went wrong.
Previously, we would guess that "Times New Roman Bold" is a regular weight font because its name contains the substring "Roman", even though the font correctly sets the BOLD flag (FT_STYLE_FLAG_BOLD). Invert the logic to give priority to the flag, as its presence is clearly more robust than a substring check. `s.find(w) >= 0` is just an obfuscated way to write `w in s`, so change that.
|
sure, done |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Previously, we would guess that "Times New Roman Bold" is a regular
weight font because its name contains the substring "Roman", even though
the font correctly sets the BOLD flag (FT_STYLE_FLAG_BOLD). Invert the
logic to give priority to the flag, as its presence is clearly more
robust than a substring check.
s.find(w) >= 0 is just an obfuscated way to write w in s, so change
that.
Obviously font properties extraction could be improved in a lot of ways, but this should close #5574.
PR Summary
PR Checklist