Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dtk_destroy_font(3) [debian man page]

DTK_LOAD_FONT(3)						Draw Toolkit manual						  DTK_LOAD_FONT(3)

NAME
dtk_load_font - Load an font SYNOPSIS
#include <drawtk.h> dtk_hfont dtk_load_font(const char *fontname); void dtk_destroy_font(dtk_hfont font); DESCRIPTION
dtk_load_font() loads the font specified by fontname argument. This should be the path of a file whose file format can be any of the file format supported by the freetype library (TrueType and Type 1 among many others) or a font description pattern understood by fontconfig (like "Times new roman:bold"). dtk_load_font() will first interpret fontname as a font filename and then, if this fail interpret as a font pattern and load the closest font available on the system. Upon creation, the font data is then tracked by an internal resource manager so that the next call using the same fontname argument will return the same font handle, thus sparing the resources of the system. There is no need for a valid window to create successfully a font, i.e. font loading is completely decoupled from the creation of others resources and can even be created in one thread to be used in another one. dtk_destroy_font() frees the resource referenced by font. If the font is used several times, i.e. several call to dtk_load_font() with the same file path, it decreases the number of uses by one. Calling dtk_destroy_texture() on each created font is currently not mandatory since all font remaining fonts are destroyed when the last window is closed. However, if no window can be closed (for example, no window has been created), dtk_destroy_font() should be called on each created font to avoid any memory leak. RETURN VALUE
In case of success, the dtk_load_font() returns the handle to the loaded font. In case of failure, NULL is returned. dtk_destroy_texture() does not return any value. THREAD SAFETY
dtk_load_font() and dtk_destroy_texture() are thread-safe. SEE ALSO
dtk_create_string(3) fc-list(1) FcPatternFormat(3) EPFL
2010 DTK_LOAD_FONT(3)

Check Out this Related Man Page

MKCFM(1)						      General Commands Manual							  MKCFM(1)

NAME
mkcfm - create summaries of font metric files in CID font directories SYNOPSIS
mkcfm [CID-font-directory-name] DESCRIPTION
There is usually only one CID font directory on the X font path. It is usually called /usr/X11R6/lib/X11/fonts/CID. If you do not specify an argument, mkcfm will try to go through the subdirectories of that directory, and create one summary of font metric files for each CID- Font (character descriptions) file and each CMap (Character Maps) file it finds. The summaries of font metric files are put in the existing CFM subdirectory. The CFM subdirectories are created when CID-keyed fonts are installed. If you specify a CID font directory as an argument, mkcfm will try to go through the subdirectories of that directory, and create one sum- mary of font metric files for each CIDFont file and each CMap file it finds. mkcfm will calculate the summaries of the font metric files stored in AFM subdirectories of the CID font directory. Those summaries are needed by the rasterizer of CID-keyed fonts to speed up the response to X font calls. If those files do not exist, CID rasterizer will have to go through usually large font metric files, and calculate the summaries itself each time the font is called. You will notice a substantial wait on a call to a large CID-keyed font. FILES
.afm files Each CID-keyed font file is supposed to have a font metric file (.afm file). mkcfm creates summary files (.cfm files) of those font metric files. mkcfm should be run whenever a change is made to the files stored in the subdirectories of the CID font directory. For example, it should be run when new CID fonts are installed. .cfm files Summaries of font metric (.afm) files created by mkcfm. SEE ALSO
The rasterizer for CID-keyed fonts in the directory xc/lib/font/Type1. CID Fonts Version 1.0 Release 1.0 MKCFM(1)
Man Page