#include "geomlib/base.h"
#include "geomlib/transform.h"
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
| struct | font_ctl |
| Control structure for font rendering. More... | |
| struct | font_info |
| Structure with information about font. More... | |
| struct | font_t1_info |
| Structure with information about Type1 font, including some Type1 specific fields. More... | |
| struct | font_truetype_info |
Defines | |
| #define | FAMILY_LENGTH 50 |
Enumerations | |
| enum | font_type { FONT_TYPE_TYPE1, FONT_TYPE_TRUETYPE, FONT_TYPE_UNKNOWN, FONT_TYPE_INVALID } |
| enum | font_charmap { FONT_CHARMAP_NONE = 0, FONT_CHARMAP_STD, FONT_CHARMAP_TEX, FONT_CHARMAP_UNICODE, FONT_CHARMAP_LATIN1 } |
Functions | |
| font_ctl * | font_ctl_init (struct font_ctl *ctl) |
| Prepare font_ctl structure for use. | |
| void | font_ctl_cleanup (struct font_ctl *ctl) |
| Discard the guts of struct font_ctl. | |
| void | font_init (const char *vrr_name) |
| Initialize the font server. | |
| void | font_finish (void) |
| Cleanup the font server. | |
| int | font_id_valid (int font_id) |
| Test for valid font descriptor. | |
| const char * | font_filename (int font_id) |
| Return font filename corresponding to fontdescriptor. | |
| int | font_load_file (const char *fname) |
| Load font file into fontserver. | |
| int | font_get_glyph_bbox (struct font_ctl *ctl, uns char_code, struct geom_rectangle *bbox) |
| Compute bounding box of a given glyph. | |
| int | font_get_string_bbox (struct font_ctl *ctl, const char *str, struct geom_rectangle *bbox) |
| Compute bounding box of a given string. | |
| int | font_render_glyph (struct font_ctl *g, uns char_code) |
| Render one given glyph. | |
| int | font_render_string (struct font_ctl *g, const char *str) |
| Render given string. | |
| int | font_get_type (int font_id) |
| Detect font type. | |
| font_info * | font_info (int font_id, struct font_info *fi) |
| Return various information about given font file. | |
| font_info * | font_info_temporary (const char *fontpath, struct font_info *fi) |
| Return various information about given font file. | |
| font_t1_info * | font_t1_info (int font_id, struct font_t1_info *fi) |
| Return various information about given Type1 font. | |
| font_truetype_info * | font_truetype_info (int font_id, struct font_truetype_info *tt) |
| Return various information about given TrueType font. | |
| int | font_get_glyph_advances (int font_id, struct garr *width) |
| Return widths of all glyphs. | |
| void | font_info_dump (int font_id) |
| Dump various debugging informations about font on stdout. | |
| uns | font_get_max_fontid (void) |
| Return maximal fontdescriptor currently known to the fontserver. | |
| int | font_pfb_to_pfa (int font_id, FILE *out) |
| Converts Type1 PFB files into PFA. | |
| const char * | font_get_ps_name (int font_id) |
| Get PostScript fontname as specified by FontName entry in font dictionary. | |
| int | font_tt_to_type42 (int fontid, const char *fontname, FILE *out) |
| Save TrueType font loaded into fontserver into external Type42 font file. | |
| int | font_char_decompose (struct font_ctl *ctl, int charcode, struct geom_pathset *pathset) |
| Decompose glyph into a curve representation. | |
| int | font_pfb_sections (byte *buf, uns size, uns *length, uns *clear_text, uns *encrypted, uns *fixed) |
| Try to compute section layout of PFB font files. | |
| int | font_pfb_data_store (byte *buf, uns size, byte *outbuf) |
| Store the PFB font file data, without segment headers. | |
| int | font_pfa_to_pfb_buf (byte *buf, uns size, byte *outbuf) |
| Convert the PFA font data into the binary PFB font data. | |
| int | font_pfa_to_pfb (int fntid, FILE *out) |
| Convert the PFA font file into the binary PFB font file. | |
| char * | font_search (const char *family, const char *style, char *outbuf, uns bufsize) |
| Search for the best matching font filename according to fontconfig database. | |
Routines for rendering font bitmaps and computing bboxes.
Copyright (c) 2004-2005,2007 The VRR Team <vrr@ucw.cz> This program is distributed under GNU General Public License, see COPYING.
|
||||||||||||||||
|
Decompose glyph into a curve representation.
|
|
|
Discard the guts of struct font_ctl. You should call it after use of any font_ctl structure.
|
|
|
Prepare font_ctl structure for use. Zeroes all fields and sets the default transformation to identity. You should call it before the first use of any font_ctl structure.
|
|
|
Return font filename corresponding to fontdescriptor.
|
|
||||||||||||
|
Return widths of all glyphs.
|
|
||||||||||||||||
|
Compute bounding box of a given glyph. Does not (re)allocate memory for bitmap in ctl, thus you don't have to deallocate it.
|
|
|
Return maximal fontdescriptor currently known to the fontserver.
|
|
|
Get PostScript fontname as specified by FontName entry in font dictionary.
|
|
||||||||||||||||
|
Compute bounding box of a given string. Does not (re)allocate memory for bitmap in ctl, thus you don't have to deallocate it.
|
|
|
Detect font type.
|
|
|
Test for valid font descriptor.
|
|
||||||||||||
|
Return various information about given font file.
|
|
|
Dump various debugging informations about font on stdout.
|
|
||||||||||||
|
Return various information about given font file. Does not load file into fontserver.
|
|
|
Load font file into fontserver. When called second time with the same filename, returns the same fontdescriptor as at the first time. Function checks if the fontfile is valid font usable by Freetype.
|
|
||||||||||||
|
Convert the PFA font file into the binary PFB font file. If the input file is not PFA, just copies the file. Note that some nonstandard PFA cannot be converted succesfully.
|
|
||||||||||||||||
|
Convert the PFA font data into the binary PFB font data. Output buffer must be large enough, that means at least size+20. If the input data is not PFA, just copies the input buffer. Note that some nonstandard PFA cannot be converted succesfully.
|
|
||||||||||||||||
|
Store the PFB font file data, without segment headers. Especially useful for PDF export. Note that this can fail on some very nonstandard PFB font files. outbuf must be at least the same size as buf. buf == outbuf is allowed.
|
|
||||||||||||||||||||||||||||
|
Try to compute section layout of PFB font files. Note that this can fail on some very nonstandard PFB font files. Does not modify any of the output arguments in case of error.
|
|
||||||||||||
|
Converts Type1 PFB files into PFA. Just rewrites if the original file is PFA.
|
|
||||||||||||
|
Render one given glyph. Warning: function looks at font_ctl.bitmap and font_ctl.bsize, allocates new bitmap if fields are zero or automatically reallocates bitmap if it is too small.
|
|
||||||||||||
|
Render given string. Warning: function looks at font_ctl.bitmap and font_ctl.bsize, allocates new bitmap if fields are zero or automatically reallocates bitmap if it is too small.
|
|
||||||||||||||||||||
|
Search for the best matching font filename according to fontconfig database. In case outbuf is too small, the filename is truncated to fit into the buffer.
|
|
||||||||||||
|
Return various information about given Type1 font.
|
|
||||||||||||
|
Return various information about given TrueType font.
|
|
||||||||||||||||
|
Save TrueType font loaded into fontserver into external Type42 font file.
|
1.3.5