Skip to content

Commit

Permalink
Google fonts: search the static dir recursively
Browse files Browse the repository at this point in the history
The Asap font has changed, so update the reference PDF.
  • Loading branch information
brechtm committed Dec 1, 2022
1 parent 6d43708 commit 1b39feb
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 17 deletions.
8 changes: 6 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ Fixed:
* Crash on rendering a heading with an index entry annotation (#369)
* Crash on encountering a fully-spanned table row (#369)
* Crash on rendering a figure caption with the default style (#368)
* Some fonts on Google Fonts have the 'otf' extension (instead of 'ttf'); also
collect these.
* Google Fonts fixes

- Some fonts on Google Fonts have the 'otf' extension (instead of 'ttf');
also collect these.
- Look recursively for font files in the a Google Fonts directory (e.g. Asap
fonts are now stored in a deeper directory).


Release 0.5.4 (2022-06-17)
Expand Down
4 changes: 2 additions & 2 deletions src/rinoh/font/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def installed_google_fonts_typefaces():
def find_static_font_files(path):
static = path / 'static'
path = static if static.is_dir() else path
yield from path.glob('*.ttf')
yield from path.glob('*.otf')
yield from path.glob('**/*.ttf')
yield from path.glob('**/*.otf')


def try_install_family(name, family_path):
Expand Down
Binary file modified tests_regression/rst/google_fonts.pdf
Binary file not shown.
Loading

0 comments on commit 1b39feb

Please sign in to comment.