Skip to content

Handle .ttf fonts with missing ulCodePageRange1 entries#906

Merged
corranwebster merged 1 commit into
mainfrom
fix/ttf-font-property-error
Mar 15, 2022
Merged

Handle .ttf fonts with missing ulCodePageRange1 entries#906
corranwebster merged 1 commit into
mainfrom
fix/ttf-font-property-error

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

I think this happens for either very old fonts or fonts which aren't fully compliant with the open type specification. Not much either we or the user can do about it, so we just ignore - the information we want isn't there.

We could write a test if we can find a font which is missing this piece of data and has a suitable license (eg. OTL). However the only fonts I could find with this are Humor sans 1.0 which is unlicensed and MTExtra which is owned by Microsoft and which is not suitably licensed.

A reviewer can validate that this PR works by:

  • having either Humor Sans or MTExtra installed in their test system
  • clearing out ~/.enthought/kiva (or the corresponding directory on Windows)
  • running some code which uses fonttools (eg. the kiva_explorer script should be fine).
  • confirming that there is no error output to the consule

Fixes #882.

I think this happens for either very old fonts or fonts which aren't fully
compliant with the open type specification.  Not much either we or the user
can do about it.
@corranwebster corranwebster merged commit bcb8d25 into main Mar 15, 2022
@jwiggins jwiggins deleted the fix/ttf-font-property-error branch March 15, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running Kiva for the first time raises errors while recreating font cache

2 participants