j1-template 2021.1.28 → 2021.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +6 -6
- data/_includes/themes/j1/layouts/content_generator_post.html +3 -0
- data/_includes/themes/j1/modules/navigator/generator.html +1 -1
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +5 -5
- data/_includes/themes/j1/procedures/posts/create_series_header.proc +6 -6
- data/_layouts/default.html +6 -2
- data/assets/data/mdil_icons.json +2417 -0
- data/assets/data/panel.html +10 -10
- data/assets/themes/j1/adapter/js/j1.js +8 -7
- data/assets/themes/j1/adapter/js/j1scroll.js +19 -1
- data/assets/themes/j1/adapter/js/navigator.js +11 -4
- data/assets/themes/j1/adapter/js/rtable.js +77 -24
- data/assets/themes/j1/core/css/icon-fonts/materialdesign-light.css +1222 -0
- data/assets/themes/j1/core/css/icon-fonts/materialdesign-light.min.css +1 -0
- data/assets/themes/j1/core/css/icon-fonts/materialdesign.css +1 -1
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +58 -109
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +28 -18
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +7 -20
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/eot/materialdesignicons-light-webfont.eot +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/materialdesignicons-light-webfont.woff +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/materialdesignicons-light-webfont.woff2 +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/svg/materialdesignicons-light-webfont.svg +801 -0
- data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/ttf/materialdesignicons-light-webfont.ttf +0 -0
- data/assets/themes/j1/core/js/template.js +4 -4
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +4 -4
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/j1Scroll/js/j1scroll.js +11 -21
- data/assets/themes/j1/modules/j1Scroll/js/j1scroll.min.js +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +1 -1
- data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +1 -1
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +5 -15
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +1 -1
- data/assets/themes/j1/modules/mdilPreviewer/css/previewer.css +97 -0
- data/assets/themes/j1/modules/mdilPreviewer/css/previewer.min.css +15 -0
- data/assets/themes/j1/modules/mdilPreviewer/js/previewer.js +125 -0
- data/assets/themes/j1/modules/mdilPreviewer/js/previewer.min.js +15 -0
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.css +3 -3
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.min.css +2 -174
- data/assets/themes/j1/modules/rtable/js/rtable.js +59 -25
- data/assets/themes/j1/modules/rtable/js/rtable.min.js +12 -683
- data/assets/themes/j1/modules/showOnScroll/js/showOnScroll.js +73 -73
- data/assets/themes/j1/modules/showOnScroll/js/showOnScroll.min.js +15 -15
- data/lib/j1/commands/generate.rb +5 -8
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +15 -51
- data/lib/starter_web/_data/blocks/banner.yml +4 -5
- data/lib/starter_web/_data/blocks/panel.yml +217 -183
- data/lib/starter_web/_data/layouts/home.yml +20 -16
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/rtable.yml +34 -0
- data/lib/starter_web/_data/modules/j1scroll.yml +12 -2
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -3
- data/lib/starter_web/_data/modules/rtable.yml +34 -0
- data/lib/starter_web/_data/resources.yml +38 -16
- data/lib/starter_web/_includes/attributes.asciidoc +6 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/modules/attics/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/{pages/videos → modules/attics}/szabo-viktor-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-01-01-about-cookies.adoc → 2021-01-01-about-cookies.adoc} +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/{2021-03-01-site-generators.adoc → 2021-02-01-site-generators.adoc} +0 -0
- data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-20-minneapolis.adoc → series/_posts/2020-01-01-post-wiki-series.adoc} +11 -10
- data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc → series/_posts/2020-01-02-post-wiki-series.adoc} +15 -13
- data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-26-columbia-river.adoc → series/_posts/2020-01-03-post-wiki-series.adoc} +28 -11
- data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/attributes.asciidoc +0 -0
- data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/documents/readme +0 -0
- data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/tables/readme +0 -0
- data/lib/starter_web/index.html +2 -2
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/000_intro.adoc +5 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +43 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +61 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/attributes.asciidoc +95 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/000_intro.asciidoc +54 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/000_basic_example.asciidoc +31 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +111 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +95 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/113_themes.asciidoc +39 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter.asciidoc +8 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/211_language_overview.asciidoc +122 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/212_values.asciidoc +502 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/213_fonts.asciidoc +261 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes.asciidoc +8 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/a2p.bat +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/a2p.sh +2 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/{book/book.a2p → documentation/documentation.a2p} +2 -8
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +86 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +848 -40
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +149 -38
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +2 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +312 -119
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +5 -5
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +5 -5
- data/lib/starter_web/pages/public/blog/navigator/archive.html +5 -5
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +51 -82
- data/assets/themes/j1/modules/rtable/js/tablesaw-init.js +0 -18
- data/assets/themes/j1/modules/rtable/js/tablesaw.stackonly.js +0 -2371
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +0 -128
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +0 -131
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +0 -131
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +0 -132
- data/lib/starter_web/pages/infinite-scroll-tester-5.adoc +0 -119
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/blindtext.asciidoc +0 -11
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/font_icons.asciidoc +0 -23
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +0 -5
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/lightbox.asciidoc +0 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/chapter_document.asciidoc +0 -9
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/entry_document.asciidoc +0 -3
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/images/image.asciidoc +0 -6
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column.asciidoc +0 -12
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column_options.asciidoc +0 -30
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_3_column.asciidoc +0 -16
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_4_column.asciidoc +0 -25
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +0 -62
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +0 -64
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +0 -73
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/attributes.asciidoc +0 -74
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/000_intro.asciidoc +0 -33
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/100_chapter_document.asciidoc +0 -21
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/110_chapter_document.asciidoc +0 -36
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter.asciidoc +0 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter/200_chapter_document.asciidoc +0 -53
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter.asciidoc +0 -5
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/000_intro.asciidoc +0 -23
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/100_chapter_document.asciidoc +0 -33
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/200_chapter_document.asciidoc +0 -26
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/900_sources.asciidoc +0 -81
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references.asciidoc +0 -23
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/tables/110_material_design_icons.asciidoc +0 -102
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +0 -136
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +0 -60
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +0 -59
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/tables/110_material_design_icons.asciidoc +0 -102
- data/lib/starter_web/pages/public/previewer/_includes/attributes.asciidoc +0 -60
- data/lib/starter_web/pages/public/previewer/_includes/documents/licenses/mit.asciidoc +0 -19
- data/lib/starter_web/pages/public/previewer/_includes/documents/readme +0 -0
- data/lib/starter_web/pages/public/previewer/_includes/documents/rouge/100_language_examples.asciidoc +0 -119
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +0 -39
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +0 -47
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/120_relative_sizes.asciidoc +0 -47
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/200_rotate.asciidoc +0 -71
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/300_flip.asciidoc +0 -31
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +0 -39
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +0 -61
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +0 -55
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/600_md_color_palette.asciidoc +0 -95
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +0 -95
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +0 -95
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/200_rouge_attributes.asciidoc +0 -41
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/300_supported_languages.asciidoc +0 -857
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +0 -47
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +0 -47
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/200_rotate.asciidoc +0 -71
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/300_flip.asciidoc +0 -30
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +0 -31
- data/lib/starter_web/pages/public/previewer/iframer.adoc +0 -93
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +0 -41
- data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +0 -574
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +0 -220
- data/lib/starter_web/pages/public/previewer/rouge.adoc +0 -133
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +0 -191
@@ -0,0 +1,261 @@
|
|
1
|
+
== Fonts
|
2
|
+
|
3
|
+
You can select from built-in PDF fonts, bundled-fonts, fonts bundled with
|
4
|
+
Asciidoctor PDF or custom fonts loaded from TrueType font (TTF) files.
|
5
|
+
If you want to use custom fonts, you must first declare them in your theme
|
6
|
+
file.
|
7
|
+
|
8
|
+
IMPORTANT: _Asciidoctor_ has no challenge working with Unicode. In fact, it
|
9
|
+
prefers Unicode and considers the entire range. However, once you convert
|
10
|
+
to PDF, you have to meet the font requirements of PDF in order to preserve
|
11
|
+
Unicode characters. There's nothing _Asciidoctor_ can do to convince PDF to
|
12
|
+
work with extended characters without the right fonts in play.
|
13
|
+
|
14
|
+
=== Built-In (AFM) Fonts
|
15
|
+
|
16
|
+
The names of the built-in fonts (for general-purpose text) are as follows:
|
17
|
+
|
18
|
+
[width="100%", cols="50%,50%", options="header", role="table-responsive mt-3"]
|
19
|
+
|===
|
20
|
+
|Font Name |Font Family
|
21
|
+
|
22
|
+
|Helvetica
|
23
|
+
|sans-serif
|
24
|
+
|
25
|
+
|Times-Roman
|
26
|
+
|serif
|
27
|
+
|
28
|
+
|Courier
|
29
|
+
|monospace
|
30
|
+
|
31
|
+
|===
|
32
|
+
|
33
|
+
Using a built-in font requires no additional files. You can use the key
|
34
|
+
anywhere a `font_family` property is accepted in the theme file.
|
35
|
+
For example:
|
36
|
+
|
37
|
+
[source,yaml]
|
38
|
+
----
|
39
|
+
base:
|
40
|
+
font_family: Times-Roman
|
41
|
+
----
|
42
|
+
|
43
|
+
However, when you use a built-in font, the characters you can use in your
|
44
|
+
document are limited to the characters in the WINANSI code set
|
45
|
+
({uri-wikipedia-codepage-windows-1252}[Windows-1252, {browser-window--new}]). WINANSI
|
46
|
+
includes most of the characters needed for writing in Western languages
|
47
|
+
(English, French, Spanish, etc). For anything outside of that, PDF is BYOF
|
48
|
+
(Bring Your Own Font).
|
49
|
+
|
50
|
+
Even though the built-in fonts require the content to be encoded in WINANSI,
|
51
|
+
_you still type your AsciiDoc document in UTF-8_. *Asciidoctor PDF* encodes
|
52
|
+
the content into WINANSI when building the PDF.
|
53
|
+
|
54
|
+
==== WINANSI Encoding Behavior
|
55
|
+
|
56
|
+
When using the built-in PDF (AFM) fonts on a block of content in your AsciiDoc
|
57
|
+
document, any character that cannot be encoded to WINANSI is replaced with a
|
58
|
+
logic "`not`" glyph (`¬`) and you'll see the following warning in your
|
59
|
+
console:
|
60
|
+
|
61
|
+
The following text could not be fully converted to the Windows-1252 character set:
|
62
|
+
| <string with unknown glyph>
|
63
|
+
|
64
|
+
This behavior differs from the default behavior in Prawn, which simply crashes.
|
65
|
+
For more information about how Prawn handles character encodings for built-in
|
66
|
+
fonts, see {uri-prawn-improved-handling-of-encodings}[this note in the Prawn
|
67
|
+
CHANGELOG, {browser-window--new}].
|
68
|
+
|
69
|
+
|
70
|
+
=== Bundled Fonts
|
71
|
+
|
72
|
+
*Asciidoctor PDF* bundles several fonts that are used by the default theme.
|
73
|
+
You can also use these fonts in your custom theme by simply declaring them.
|
74
|
+
These fonts provide more characters than the built-in PDF fonts, but still
|
75
|
+
only a subset of UTF-8 (to reduce the size of the gem).
|
76
|
+
|
77
|
+
The family name of the fonts bundled with *Asciidoctor PDF* are as follows:
|
78
|
+
|
79
|
+
{uri-font-noto-serif}[Noto Serif, {browser-window--new}]::
|
80
|
+
A serif font that can be styled as normal, italic, bold or bold_italic.
|
81
|
+
|
82
|
+
{uri-font-m-plus-fonts}[M+ 1mn, {browser-window--new}]::
|
83
|
+
A monospaced font that maps different thicknesses to the styles normal, italic,
|
84
|
+
bold and bold_italic. Also provides the circuled numbers used in callouts.
|
85
|
+
|
86
|
+
{uri-font-m-plus-fonts}[M+ 1p Fallback, {browser-window--new}]::
|
87
|
+
A sans-serif font that provides a very complete set of Unicode glyphs. Cannot
|
88
|
+
be styled as italic, bold or bold_italic. Used as the fallback font.
|
89
|
+
|
90
|
+
CAUTION: At the time of this writing, you cannot use the bundled fonts if you
|
91
|
+
change the value of the `pdf-fontsdir` attribute (and thus define your own
|
92
|
+
custom fonts). This limitation may be lifted in the future.
|
93
|
+
|
94
|
+
=== Custom Fonts
|
95
|
+
|
96
|
+
The limited character set of WINANSI, or the bland look of the built-in fonts,
|
97
|
+
may motivate you to load your own font. Custom fonts can enhance the look of
|
98
|
+
your PDF theme substantially.
|
99
|
+
|
100
|
+
To start, you need to find a collection of TTF file of the font you want to use.
|
101
|
+
A collection typically consists of all four styles of a font:
|
102
|
+
|
103
|
+
* normal
|
104
|
+
* italic
|
105
|
+
* bold
|
106
|
+
* bold_italic
|
107
|
+
|
108
|
+
You'll need all four styles to support AsciiDoc content properly. _Asciidoctor
|
109
|
+
PDF cannot italicize a font dynamically like a browser can, so you need the
|
110
|
+
italic style._
|
111
|
+
|
112
|
+
Once you've obtained the TTF files, put them into a directory in your project
|
113
|
+
where you want to store the fonts. It's recommended that you name them
|
114
|
+
consistently so it's easier to type the names in the theme file.
|
115
|
+
|
116
|
+
Let's assume the name of the font is {uri-font-roboto-ttf}[Roboto, {browser-window--new}].
|
117
|
+
Name the files as follows:
|
118
|
+
|
119
|
+
* roboto-normal.ttf (_originally Roboto-Regular.ttf_)
|
120
|
+
* roboto-italic.ttf (_originally Roboto-Italic.ttf_)
|
121
|
+
* roboto-bold.ttf (_originally Roboto-Bold.ttf_)
|
122
|
+
* roboto-bold_italic.ttf (_originally Roboto-BoldItalic.ttf_)
|
123
|
+
|
124
|
+
Next, declare the font under the `font_catalog` key at the top of your theme
|
125
|
+
file, giving it a unique key (e.g., `Roboto`).
|
126
|
+
|
127
|
+
[source,yaml]
|
128
|
+
----
|
129
|
+
font:
|
130
|
+
catalog:
|
131
|
+
Roboto:
|
132
|
+
normal: roboto-normal.ttf
|
133
|
+
italic: roboto-italic.ttf
|
134
|
+
bold: roboto-bold.ttf
|
135
|
+
bold_italic: roboto-bold_italic.ttf
|
136
|
+
----
|
137
|
+
|
138
|
+
You can use the key that you assign to the font in the font catalog anywhere
|
139
|
+
the `font_family` property is accepted in the theme file. For instance, to use
|
140
|
+
the Roboto font for all headings, you'd use:
|
141
|
+
|
142
|
+
[source,yaml]
|
143
|
+
----
|
144
|
+
heading:
|
145
|
+
font_family: Roboto
|
146
|
+
----
|
147
|
+
|
148
|
+
When you execute *Asciidoctor PDF*, you need to specify the directory where the
|
149
|
+
fonts reside using the `pdf-fontsdir` attribute:
|
150
|
+
|
151
|
+
$ asciidoctor-pdf -a pdf-style=basic-theme.yml -a pdf-fontsdir=path/to/fonts document.adoc
|
152
|
+
|
153
|
+
WARNING: Currently, all fonts referenced by the theme need to be present in
|
154
|
+
the directory specified by the `pdf-fontsdir` attribute.
|
155
|
+
|
156
|
+
When *Asciidoctor PDF* creates the PDF, it only embeds the glyphs from the font
|
157
|
+
that are needed to render the characters present in the document. In other
|
158
|
+
words, *Asciidoctor PDF* automatically subsets the font. However, if you're
|
159
|
+
storing the fonts in a repository, you may want to subset the font (for
|
160
|
+
instance, by using FontForge) to reduce the space the font occupies in that
|
161
|
+
storage. This is simply a personal preference.
|
162
|
+
|
163
|
+
You can add any number of fonts to the catalog. Each font must be assigned
|
164
|
+
a unique key, as shown here:
|
165
|
+
|
166
|
+
[source,yaml]
|
167
|
+
----
|
168
|
+
font:
|
169
|
+
catalog:
|
170
|
+
Roboto:
|
171
|
+
normal: roboto-normal.ttf
|
172
|
+
italic: roboto-italic.ttf
|
173
|
+
bold: roboto-bold.ttf
|
174
|
+
bold_italic: roboto-bold_italic.ttf
|
175
|
+
Roboto Light:
|
176
|
+
normal: roboto-light-normal.ttf
|
177
|
+
italic: roboto-light-italic.ttf
|
178
|
+
bold: roboto-light-bold.ttf
|
179
|
+
bold_italic: roboto-light-bold_italic.ttf
|
180
|
+
----
|
181
|
+
|
182
|
+
TIP: Text in SVGs will use the font catalog from your theme. We recommend
|
183
|
+
that you match the font key to the name of the font seen by the operating
|
184
|
+
system. This will allow you to use the same font names (aka families) in
|
185
|
+
both your graphics program and *Asciidoctor PDF*.
|
186
|
+
|
187
|
+
=== Fallback Fonts
|
188
|
+
|
189
|
+
If a TrueType font is missing a character needed to render the document,
|
190
|
+
such as a special symbol, you can have *Asciidoctor PDF* look for the character
|
191
|
+
in a fallback font. You only need to specify a single fallback font, typically
|
192
|
+
one that provides a full set of symbols.
|
193
|
+
|
194
|
+
IMPORTANT: The fallback font is only used when the primary font is a
|
195
|
+
TrueType font (i.e., TTF, DFont, TTC). Any glyph missing from an AFM font
|
196
|
+
is simply replaced with the "`not`" glyph (`¬`).
|
197
|
+
|
198
|
+
CAUTION: Using the fallback font slows down PDF generation slightly because
|
199
|
+
it has to analyze every single character. It's use is not recommended for
|
200
|
+
large documents. Instead, it's best to select primary fonts that have all
|
201
|
+
the characters you need. Keep in mind that the default theme currently uses
|
202
|
+
a fallback font, though this may change in the future.
|
203
|
+
|
204
|
+
Like with other custom fonts, you first need to declare the fallback font.
|
205
|
+
Let's choose {uri-font-droid-sans-fallback-ttf}[Droid Sans Fallback, {browser-window--new}].
|
206
|
+
You can map all the styles to a single font file (since bold and italic don't
|
207
|
+
usually make sense for symbols).
|
208
|
+
|
209
|
+
[source,yaml]
|
210
|
+
----
|
211
|
+
font:
|
212
|
+
catalog:
|
213
|
+
Roboto:
|
214
|
+
normal: roboto-normal.ttf
|
215
|
+
italic: roboto-italic.ttf
|
216
|
+
bold: roboto-bold.ttf
|
217
|
+
bold_italic: roboto-bold_italic.ttf
|
218
|
+
DroidSansFallback:
|
219
|
+
normal: droid-sans-fallback.ttf
|
220
|
+
italic: droid-sans-fallback.ttf
|
221
|
+
bold: droid-sans-fallback.ttf
|
222
|
+
bold_italic: droid-sans-fallback.ttf
|
223
|
+
----
|
224
|
+
|
225
|
+
Next, add the key name to the `fallbacks` key under the `font_catalog` key.
|
226
|
+
The `fallbacks` key accepts an array of values, meaning you can specify more
|
227
|
+
than one fallback font. However, we recommend using a single fallback font,
|
228
|
+
if possible, as shown here:
|
229
|
+
|
230
|
+
[source,yaml]
|
231
|
+
----
|
232
|
+
font:
|
233
|
+
catalog:
|
234
|
+
Roboto:
|
235
|
+
normal: roboto-normal.ttf
|
236
|
+
italic: roboto-italic.ttf
|
237
|
+
bold: roboto-bold.ttf
|
238
|
+
bold_italic: roboto-bold_italic.ttf
|
239
|
+
DroidSansFallback:
|
240
|
+
normal: droid-sans-fallback.ttf
|
241
|
+
italic: droid-sans-fallback.ttf
|
242
|
+
bold: droid-sans-fallback.ttf
|
243
|
+
bold_italic: droid-sans-fallback.ttf
|
244
|
+
fallbacks:
|
245
|
+
- DroidSansFallback
|
246
|
+
----
|
247
|
+
|
248
|
+
TIP: If you are using more than one fallback font, add additional lines
|
249
|
+
to the `fallbacks` key.
|
250
|
+
|
251
|
+
Of course, make sure you've configured your theme to use your custom font:
|
252
|
+
|
253
|
+
[source,yaml]
|
254
|
+
----
|
255
|
+
base:
|
256
|
+
font_family: Roboto
|
257
|
+
----
|
258
|
+
|
259
|
+
That's it! Now you're covered. If your custom font is missing a glyph,
|
260
|
+
*Asciidoctor PDF* will look in your fallback font. You don't need to reference
|
261
|
+
the fallback font anywhere else in your theme file.
|
@@ -15,11 +15,11 @@ BASE_PATH=/D/j1/github/j1-template/packages/400_template_site
|
|
15
15
|
# VARIABLES
|
16
16
|
# ------------------------------------------------------------------------------
|
17
17
|
PDF_STYLES_DIR=$BASE_PATH/_data/asciidoc2pdf
|
18
|
-
PDF_FONTS_DIR=$BASE_PATH_data/_data/asciidoc2pdf
|
18
|
+
PDF_FONTS_DIR=$BASE_PATH_data/_data/asciidoc2pdf/fonts
|
19
19
|
PLUGINS_DIR=$BASE_PATH/_plugins
|
20
20
|
PLUGIN_TWITTER_EMOJI=$PLUGINS_DIR/asciidoctor-extensions/twitter-emoji-inline.rb
|
21
21
|
PLUGIN_LOREM_INLINE=$PLUGINS_DIR/lorem_inline.rb
|
22
|
-
MASTER_DOCUMENT=./
|
22
|
+
MASTER_DOCUMENT=./documentation.a2p
|
23
23
|
|
24
24
|
# MAIN
|
25
25
|
# ------------------------------------------------------------------------------
|
@@ -95,15 +95,9 @@ include::{documentdir}/000_intro.asciidoc[]
|
|
95
95
|
// Include Sublevel Entry Documents
|
96
96
|
// -----------------------------------------------------------------------------
|
97
97
|
|
98
|
-
include::{documentdir}/
|
98
|
+
include::{documentdir}/100_converter.asciidoc[]
|
99
99
|
|
100
|
-
include::{documentdir}/
|
101
|
-
|
102
|
-
|
103
|
-
// Document References
|
104
|
-
// -----------------------------------------------------------------------------
|
105
|
-
|
106
|
-
include::{documentdir}/900_references.asciidoc[]
|
100
|
+
include::{documentdir}/200_themes.asciidoc[]
|
107
101
|
|
108
102
|
|
109
103
|
// Document Index
|
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
# Master Document HTML conversion: book.adoc
|
3
|
+
#
|
4
|
+
title: Skeleton
|
5
|
+
tagline: documentation
|
6
|
+
date: 2021-01-01 00:00:00 +100
|
7
|
+
description: >
|
8
|
+
A document of type documentation (book) typically consists in a large
|
9
|
+
number of chapters and sections. To make this manageable, book-type
|
10
|
+
documents are splitted in multiple files placed in a nested folder
|
11
|
+
structure. Complex AsciiDoc projects of type documentation can be
|
12
|
+
easily worked on by multiple authors.
|
13
|
+
|
14
|
+
categories: [ Knowledge ]
|
15
|
+
tags: [ Asciidoc, Skeleton, Documentation, PDF ]
|
16
|
+
|
17
|
+
sitemap: false
|
18
|
+
advertising: false
|
19
|
+
comments: false
|
20
|
+
|
21
|
+
robots:
|
22
|
+
index: false
|
23
|
+
follow: false
|
24
|
+
|
25
|
+
permalink: /pages/public/skeleton/documentation/
|
26
|
+
regenerate: false
|
27
|
+
|
28
|
+
resources: [ clipboard, lightbox, rouge ]
|
29
|
+
resource_options:
|
30
|
+
- toccer:
|
31
|
+
collapseDepth: 4
|
32
|
+
- attic:
|
33
|
+
padding_top: 400
|
34
|
+
padding_bottom: 50
|
35
|
+
opacity: 0.5
|
36
|
+
slides:
|
37
|
+
- url: /assets/images/modules/attics/humble-lamb-1920x1280.jpg
|
38
|
+
alt: Photo by Humble Lamb on Unsplash
|
39
|
+
alignY: top
|
40
|
+
badge:
|
41
|
+
type: unsplash
|
42
|
+
author: Humble Lamb
|
43
|
+
href: https://unsplash.com/@humblelamb
|
44
|
+
---
|
45
|
+
|
46
|
+
// Page Initializer
|
47
|
+
// =============================================================================
|
48
|
+
// Enable the Liquid Preprocessor
|
49
|
+
:page-liquid:
|
50
|
+
|
51
|
+
// Set (local) page attributes here
|
52
|
+
// -----------------------------------------------------------------------------
|
53
|
+
// :page--attr: <attr-value>
|
54
|
+
|
55
|
+
// Load Liquid procedures
|
56
|
+
// -----------------------------------------------------------------------------
|
57
|
+
{% capture load_attributes %}themes/{{site.template.name}}/procedures/global/attributes_loader.proc{%endcapture%}
|
58
|
+
|
59
|
+
// Load page attributes
|
60
|
+
// -----------------------------------------------------------------------------
|
61
|
+
{% include {{load_attributes}} scope="all" %}
|
62
|
+
|
63
|
+
|
64
|
+
// Page content
|
65
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
66
|
+
The Asciidoc skeleton *documentation* (book) a helper for setting up a base
|
67
|
+
file and folder structure for *complex* multi-chapter AsciiDoc projects of
|
68
|
+
type *book* based on _Jekyll_ and _J1 Template_.
|
69
|
+
|
70
|
+
A document of type documentation typically consists in a large number
|
71
|
+
of chapters and sections. To make this manageable, book-type documents are
|
72
|
+
splitted in multiple files placed in a *nested* folder structure. Complex
|
73
|
+
AsciiDoc projects of type documentation (book) can be easily worked on by
|
74
|
+
*multiple* authors.
|
75
|
+
|
76
|
+
|
77
|
+
// Include Intro
|
78
|
+
// -----------------------------------------------------------------------------
|
79
|
+
include::{documentdir}/000_intro.asciidoc[]
|
80
|
+
|
81
|
+
|
82
|
+
// Include Sublevel Entry Documents
|
83
|
+
// -----------------------------------------------------------------------------
|
84
|
+
include::{documentdir}/100_converter.asciidoc[]
|
85
|
+
|
86
|
+
include::{documentdir}/200_themes.asciidoc[]
|