Asciidoctor: please provide a solution to turn off Google fonts in HTML

Created on 18 Dec 2017  路  4Comments  路  Source: asciidoctor/asciidoctor

Hi,

From a privacy point of view it would be good to be able to not load fonts from Google.
Could you provide an option to deactivate this?
This is recognized as a privacy breach in Debian. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877546

Indirectly, this would also somehow provide a workaround for #1867.

Thanks!

Most helpful comment

Actually, there is a way to turn them off. Just unset the webfonts attribute.

asciidoctor -a webfonts! document.adoc

or

= Document Title
:!webfonts:

The stylesheet will then fallback to system fonts.

This built-in attribute is documented in the user manual.

All 4 comments

Web fonts are used in the default stylesheet.
If you don't want to use Web fonts you can use a custom stylesheet:

.test.adoc

= Test

.plain.css

/* empty */

The generated file will be:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.7.dev">
<title>Test</title>
<style>

</style>
</head>
<body class="article">
<div id="header">
<h1>Test</h1>
</div>
<div id="content">

</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-12-19 08:58:55 CET
</div>
</div>
</body>
</html>

Actually, there is a way to turn them off. Just unset the webfonts attribute.

asciidoctor -a webfonts! document.adoc

or

= Document Title
:!webfonts:

The stylesheet will then fallback to system fonts.

This built-in attribute is documented in the user manual.

thanks @Mogztter and @mojavelinux for your answers. Next time I'll do a more extensive search in the documentation before forwarding such a bug.
I can thus close this (non)issue. Thanks again.

:+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blueray453 picture blueray453  路  3Comments

wols picture wols  路  6Comments

graphitefriction picture graphitefriction  路  3Comments

pinggit picture pinggit  路  3Comments

filiphr picture filiphr  路  6Comments