Skip to content

Commit

Permalink
move fallback font to default-with-fallback-font theme and remove fro…
Browse files Browse the repository at this point in the history
…m default theme
  • Loading branch information
mojavelinux committed Jul 8, 2019
1 parent 6a8a4c8 commit 7fd3a6e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -8,6 +8,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
== Unreleased

* rename pdf-style and pdf-stylesdir attributes to pdf-theme and pdf-themesdir, respectively (while still honoring the old names for compatibility) (#1127)
* don't load fallback font by default; move fallback font to default-with-fallback-font theme
* apply cell padding to table cells in the head row (#1098)
* allow the theme to control the padding of table cells in the head row using the table_head_cell_padding key (#1098)
* fix position of table caption for reduced-width tables when caption align is center (#1138)
Expand Down
9 changes: 0 additions & 9 deletions data/themes/default-theme.yml
Expand Up @@ -12,15 +12,6 @@ font:
bold: mplus1mn-bold-ascii.ttf
italic: mplus1mn-italic-ascii.ttf
bold_italic: mplus1mn-bold_italic-ascii.ttf
# M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
# It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
M+ 1p Fallback:
normal: mplus1p-regular-fallback.ttf
bold: mplus1p-regular-fallback.ttf
italic: mplus1p-regular-fallback.ttf
bold_italic: mplus1p-regular-fallback.ttf
fallbacks:
- M+ 1p Fallback
page:
background_color: ffffff
layout: portrait
Expand Down
22 changes: 22 additions & 0 deletions data/themes/default-with-fallback-font-theme.yml
@@ -0,0 +1,22 @@
extends: default
font:
catalog:
Noto Serif:
normal: notoserif-regular-subset.ttf
bold: notoserif-bold-subset.ttf
italic: notoserif-italic-subset.ttf
bold_italic: notoserif-bold_italic-subset.ttf
M+ 1mn:
normal: mplus1mn-regular-ascii-conums.ttf
bold: mplus1mn-bold-ascii.ttf
italic: mplus1mn-italic-ascii.ttf
bold_italic: mplus1mn-bold_italic-ascii.ttf
# M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
# It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
M+ 1p Fallback:
normal: mplus1p-regular-fallback.ttf
bold: mplus1p-regular-fallback.ttf
italic: mplus1p-regular-fallback.ttf
bold_italic: mplus1p-regular-fallback.ttf
fallbacks:
- M+ 1p Fallback
2 changes: 1 addition & 1 deletion lib/asciidoctor-pdf/theme_loader.rb
Expand Up @@ -92,7 +92,7 @@ def self.load_file filename, theme_data = nil, theme_path = nil
if extend_file == 'base'
theme_data = theme_data ? (::OpenStruct.new theme_data.to_h.merge load_base_theme.to_h) : load_base_theme
next
elsif extend_file == 'default'
elsif extend_file == 'default' || extend_file == 'default-with-fallback-font'
extend_file, extend_theme_path = resolve_theme_file extend_file
elsif extend_file.start_with? './'
extend_file, extend_theme_path = resolve_theme_file extend_file, (::File.dirname filename)
Expand Down

0 comments on commit 7fd3a6e

Please sign in to comment.