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
- Get current Timestamp in CET format and concatenate with string in yml file
- How to generate random item from json file in yaml code for artilliery load testing?
- Github Actions/variable-mapper : Error: Unexpected token *** in JSON
- Traverse through nodes with a path and change a value in a YAML File using yaml-cpp
- JSYAML custom schema for INT
- Deploy Docker Image into AKS cluster using Azure Release Pipelines with the parameters like clustername, acr, resourcegroup
- Allow AWS API Gateway to return YAML format, when a specific JSON property equals YAML
- Does Golang Yaml Unmarshal Support accessing nested yaml through struct tags?
- How to escape angle brackets in YAML?
- Mark OpenAPI schema enum value as deprecated
- yaml.safe_load removes whitespaces if also contains a line break
- Convert Azure desired state configs (DSC) powershell scripts to JSON or YAML
- GCP Cloud Build deploying a scheduler job
- I'm having issues with YAML skipping a job, based on a parameter value passed into the YAML
- Ansible role variable is not defined
Related Questions in ASCIIDOCTOR
- Is there a way to combine curly quotes and em dash in AsciiDoc?
- How do I include visible spaces in code listing in table
- Doctoolchain Docker Container fails to pull in dependencies
- Is there a way to render the document attributes of an asciidoc file and output to an adoc file?
- How can I render mermaid diagrams of type C4 in asciidoctor?
- batch script returns unexpectedly after first asciidoctor command completion
- How to get Asciidoctor to render source tags with color
- Table in pdf, generated from Asciidoctor have word wrapping but the word becomes unsearchable
- Specify version of dependency of Gradle AsciidoctorJ Plugin
- How do I enable tabs in Asciidoc and Maven with asciidoctor-tabs and asciidoctor-maven-plugin?
- auto-generating list of figures and list of tables in asciidoctor
- Asciidoctor tables in docx no style
- Get list of includes in a parsed document
- How to add RGB or CMYK output intent profile to a PDF
- - In plugin 'org.asciidoctor.convert' type 'org.asciidoctor.gradle.AsciidoctorTask' property 'logDocuments' is annotated with @Optional
Related Questions in ASCIIDOCTOR-PDF
- Table in pdf, generated from Asciidoctor have word wrapping but the word becomes unsearchable
- How to add RGB or CMYK output intent profile to a PDF
- Gradle plugin AsciidoctorPdf: Extend font search path
- How to add borders to headings in AsciiDoctor-pdf PDF output
- Terminating due to java.lang.OutOfMemoryError: Metaspace (AsciiDoctorj-pdf)
- Asciidoctor: Is it possible to activate section numbering in themes yml
- Text with background color and rounded borders in asciidoctor-pdf
- asciidoc: Return to Section after Subsection
- How to include a horizontal line in the header?
- Using a custom icon font with asciidoctor-pdf
- Asciidoctor-pdf no parsing
- How to map level 1 to H1 in asciidoc
- Asciidoctor Font
- asciidoctor-pdf cannot load such file -- matrix (LoadError)
- Best way to generate Mastering the Lightning Network PDF from ASCIIDOC
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 # Hahtags
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: