How do I add the default font of Asciidoctor HTML to Asciidoctor pdf? Can I use the Webfont example: "@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700); " to my attributes file for the pdf format?
1
There are 1 best solutions below
Related Questions in YAML
- PyYAML variables in multiline
- What does the dot mean in Symfony service names?
- Set-like alternative for yaml files
- How do I convert a python list to simple YAML?
- Saving order in ruamel.yaml
- REST API design for cloning a resource
- Pythonic way to get value defined or not defined in yaml
- how to install new nodejs modules to expressjs project?
- Can I use hiera with a YAML backend to combine arrays?
- Should YamlConfiguration objects be closed?
- behat yml extract urlbase to suite level
- Yaml syntax to create this array
- Go Yaml Interpretation Example
- Scala: Parse a Yaml file using SnakeYaml
- YAML file do integer calculation
Related Questions in ASCIIDOCTOR
- Asciidoctor navigation bar
- How to serve generated static HTML file with Jersey 2?
- assigning variable names/tags to asciidoc document so I can use those names in jinja template
- In asciidoc how do I execute a macro only for pdf generation?
- Include docx file in asciidoc?
- add cover page with asciidoctor
- How to get list of figures in Asciidoc
- How to include a toc when going from AsciiDoctor to Markdown via Pandoc?
- How to specify a default label on a asciidoctor bibliograpy
- Asciidoc autonumbering callouts with modified start number
- Asciidoc numbered sections, but only part of document
- No images in generated PDF document (from Asciidoc to PDF)
- Generate single PDF from multiple Asciidoc files
- Asciidoctor tables in docx no style
- auto-generating list of figures and list of tables in asciidoctor
Related Questions in ASCIIDOCTOR-PDF
- In asciidoc how do I execute a macro only for pdf generation?
- No images in generated PDF document (from Asciidoc to PDF)
- Generate single PDF from multiple Asciidoc files
- Asciidoctor fails to parse formatted text: "<a data-type
- Unable to render footer using Asciidoctor pdf
- Text with background color and rounded borders in asciidoctor-pdf
- Better way to include content as-is with AsciiDoc include directive
- asciidoctor-pdf cannot load such file -- matrix (LoadError)
- Asciidoctor Font
- Reference page in printed asciidoc documentation
- Not printing anything after for loop in a batch script
- Create Index page for ASCII doc
- asciidoctor-pdf cover page image size to fill the page
- Generating table of contents for multi-file asciidoc book
- Asciidoctor: store git commit hash in pdf
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The webfont example you gave works for HTML output, when the styling is done with CSS. For Asciidoctor-pdf, the styling is not done with CSS but through a YML file, here is the default Asciidoctor-pdf theme.
If you want the Asciidoctor HTML style in PDF you will need to check the Asciidoctor default CSS and try to recreate it for Asciidoctor-pdf. If you are only interested in the font you will probably need the Open Sans font, I did not find a way to include a web font so you will have to download it and create your custom theme.
The default font in Asciidoctor-pdf is Noto Serif, a simple way to change it to Open Sans would be to create a
custom-theme.ymlfile like this:More information about theming in the Asciidoctor PDF Theming Guide Organize your files like this:
and set your custom theme as an attribute when calling
asciidoctor-pdflike this: