eugmes / fntsample

PDF and PostScript font samples generator (migrating from https://sourceforge.net/projects/fntsample/)
GNU General Public License v3.0
23 stars 4 forks source link

[solved] noto characters in PDF that are not related to actual content (probably just style related), how do I change it? #31

Closed ghost closed 2 years ago

ghost commented 2 years ago

here is an example arial.ttf
arial.ttf.zip

arial.ttf.pdf arial.ttf.pdf.zip


running on Cygwin,
which relay on C:\Windows\Fonts\ for actual having other fonts I've edited C:\cygwin\etc\fonts\fonts.conf

<!-- Font directory list -->

+<dir>/cygdrive/C/Windows/Fonts</dir>
+<dir>C:/Windows/Fonts</dir>
+<dir>/usr/share/fonts</dir>

fonts.zip

and then the result was looking fine,


my suggestion/question is,
how to control, what I assume is a hard-codded styling for the PDF,

or an ability to control the non-critical presentation layer of the PDF,
either of those would be greatly appreciated.

eugmes commented 2 years ago

Hi, the fonts for the tables are not hardcoded, but they do need to be installed (you cannot just specify a font file for them). You can change those fonts using --style option. Here are the defaults for various styles (as shown when --help is supplied):

    header-font (Sans Bold 12)
    font-name-font (Serif Bold 12)
    table-numbers-font (Sans 10)
    cell-numbers-font (Mono 8)

You can change the header font like this:

    fntsample --style "header-font: Arial 14" ....