• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H01-Aug-2021-5140

CMake/H01-Aug-2021-145115

po/H03-May-2022-347300

scripts/H03-May-2022-442317

src/H03-May-2022-1,343995

.editorconfigH A D01-Aug-2021346 2720

.gitignoreH A D01-Aug-202116 32

COPYINGH A D01-Aug-202134.2 KiB677553

ChangeLogH A D01-Aug-20213.1 KiB9375

README.rstH A D01-Aug-20213.1 KiB8760

README.rst

1fntsample
2=========
3
4|build| |license|
5
6.. |build| image:: https://github.com/eugmes/fntsample/actions/workflows/ci.yml/badge.svg
7    :target: https://github.com/eugmes/fntsample/actions/workflows/ci.yml
8.. |license| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
9    :alt: License: GPL v3
10    :target: https://www.gnu.org/licenses/gpl-3.0
11
12``fntsample`` is a tool that can be used to make font samples that show coverage of the font
13and are similar in appearance to `Unicode Charts <https://www.unicode.org/charts/>`_.
14It was developed for use with `DejaVu Fonts <https://dejavu-fonts.github.io>`_ project.
15``fntsample`` is licensed under `GPL <https://www.gnu.org/licenses/gpl.html>`_ version 3 or later.
16
17.. image:: screenshot.png
18   :alt: Output example
19
20Features
21--------
22
23* Support for various font formats using `FreeType <https://www.freetype.org>`_ library,
24  including TrueType, OpenType, and Type1.
25
26* Creating samples in PDF, PostScript, and SVG formats.
27
28* Adding outlines with Unicode block names for PDF samples.
29
30* Selection of code ranges to show in charts.
31
32* Comparing of two font files with highlighting of added glyphs.
33
34* Runs on Linux and other Unix-like systems.
35
36Download
37--------
38
39Releases are available from `releases page <https://github.com/eugmes/fntsample/releases>`_.
40For source code releases for versions before 5.0 visit the `old project page <https://sourceforge.net/projects/fntsample/>`_.
41The source code and issues tracker are accessible via the `project page <https://github.com/eugmes/fntsample>`_.
42
43Building
44--------
45
46The following libraries are required to build ``fntsample``:
47`cairo <https://www.cairographics.org>`_,
48`fontconfig <https://www.fontconfig.org>`_,
49`FreeType2 <https://www.freetype.org>`_,
50`GLib <https://developer.gnome.org/glib/>`_,
51`Pango <https://pango.gnome.org/>`_,
52`gettext <https://www.gnu.org/software/gettext/>`_.
53They should be available in most Linux distributions.
54Additionally Unicode `blocks <https://unicode.org/Public/UNIDATA/Blocks.txt>`_ file is required.
55
56`CMake <https://cmake.org>`_ is used to build the code. In the directory with source code execute::
57
58    % mkdir build
59    % cd build
60    % cmake .. -DUNICODE_BLOCKS=/path/to/Blocks.txt
61    % make
62    % make install
63
64The last step will install files under ``/usr/local`` by default. This can be overridden by adding
65``-DCMAKE_INSTALL_PREFIX=/another/prefix`` to the ``cmake`` invocation.
66
67``fntsample`` could be built using `Homebrew <https://brew.sh>`_ on macOS.
68Use the following commands to install dependencies and configure the build
69environment before building the code::
70
71    % brew install cmake pgk-config gettext cairo pango fontconfig freetype glib
72    % export CMAKE_PREFIX_PATH=/usr/local/opt/gettext
73
74Alternatively you can install ``fntsample`` using a Homebrew
75`formula <https://github.com/eugmes/homebrew-fntsample>`_::
76
77    % brew install eugmes/fntsample/fntsample
78
79Usage
80-----
81
82The basic usage for ``fntsample`` looks as follows::
83
84    % fntsample -f /file/to/font/file.ttf -o output.pdf
85
86For more advanced usage consult the man pages for ``fntsample`` and ``pdfoutline``.
87