office-gobmx/vcl/Executable_listfonts.mk
Chris Sherlock dabeab27da vcl: Create listfonts utility
The listfonts utility gets the details of all available fonts on the
system. It prints out the information, or stores it in a text file,
if a file name is passed to it as an argument.

An example invocation to store the information in a file named
fonts.txt is:

    ./bin/run listfonts fonts.txt

To get the correct font metrics, you actually have to get the font
metric from the system, and then set it as the current font of
OutputDevice, then get the font metric (which corrects a variety of
things like the orientation, line, height, slant, etc. - including
converting from logical coords to device coords).

The information is reported for each font family. On the top is the
family name, and then comes other details. Here is a report for an
example font:

FreeSans
    Family type: swiss
    Style name: Regular
    Weight: normal
    Italic: none
    Pitch: variable
    Width type: normal
    Alignment: top
    Charset: UCS2 (aka Unicode)
    Symbol font? no
    Ascent: 13
    Descent: 3
    Internal leading: 0
    External leading: 2
    Line height: 16
    Slant: 0
    Bullet offset: 0
    Fullstop centered? yes
    Orientation: 0 degrees
    Quality: 18477

There is a -v (or --verbose) option that output font features.

Change-Id: Icfc4da96459bea47c4233a5509496566c04d460c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127365
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-01-08 12:58:14 +01:00

36 lines
821 B
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Executable_Executable,listfonts))
$(eval $(call gb_Executable_use_api,listfonts,\
offapi \
udkapi \
))
$(eval $(call gb_Executable_set_include,listfonts,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_Executable_use_libraries,listfonts,\
tl \
sal \
vcl \
cppu \
cppuhelper \
comphelper \
i18nlangtag \
))
$(eval $(call gb_Executable_add_exception_objects,listfonts,\
vcl/workben/listfonts \
))
# vim: set noet sw=4 ts=4: