asfont - text drawing functionality and handling of TTF and X11 fonts libAfterImage/asfont.h
Contents
Description
Changes inter-glyph spacing of the specified font.
3rd Berkeley Distribution AfterStep v.2.2.12 asfont(3x)
Inputs
font - Loaded ASFont structure.
x - new horizontal spacing value.
y - new vertical spacing value.
Name
asfont - text drawing functionality and handling of TTF and X11 fonts libAfterImage/asfont.h
Nameasfont
Nameasfontmanager
Nameasfonttype
- Supported types of fonts - Xlib or FreeType 2 ASF_GuessWho will enable autodetection of the font type.
It is attempted to be opened as FreeType font first, and if that fails - it will be opened as Xlib font.
Nameasglyph
Nameasglyphrange
Nameastext3Dtype
- Available types of 3D text to be drawn.
Nameastextattributes
- Attributes for text rendering
Namecreate_Font_Manager()
Namedestroy_Font_Manager()
Namedraw_Text()
draw_fancy_text()
get_text_size()
get_fancy_text_size();
Nameget_Asfont()
Nameget_Asfont_Glyph_Spacing()
Namemax_Glyphs_Per_Font
- Max value of glyphs per font allowed. We need that so we can detect and avoid broken fonts somehow.
Nameopen_Freetype_Font()
Nameopen_X11_Font()
Nameprint_Asfont()
Nameprint_Asglyph()
Namerelease_Font()
Nameset_Asfont_Glyph_Spacing()
Return Value
TRue on success.
See Also
Structures :
ASFontManager
ASFont
ASGlyph
ASGlyphRange
Functions :
create_font_manager(), destroy_font_manager(),
open_freetype_font(), open_X11_font(), get_asfont(),
destroy_font(), print_asfont(), print_asglyph(),
draw_text(),
get_asfont_glyph_spacing(), set_asfont_glyph_spacing()
Other libAfterImage modules :
ascmap.h asfont.h asimage.h asvisual.h blender.h export.h
import.h transform.h ximage.h
Source
typedef struct ASTextAttributes { #define ASTA_UseTabStops (0x01<<0)
unsigned int version ;
/* structure version, so we can implement future
* extensions without breaking binary apps */
ASFlagType rendition_flags ;
ASText3DType type;
ASCharType char_type;
unsigned int tab_size ; /* tab size in chars - defaults to 8 */
unsigned int origin ; /* distance from the left margin
* (in pixels) */
unsigned int *tab_stops ; /* tab stops in pixels where
* left margin is 0 */
unsigned int tab_stops_num ;
ARGB32 fore_color ; /* used with 3D type of Outlined */
unsigned int width; #define ASTA_VERSION_1 1
#define ASTA_VERSION_INTERNAL ASTA_VERSION_1 }ASTextAttributes;
libAfterImage/asfont/create_font_manager()
Synopsis
Bool set_asfont_glyph_spacing( ASFont* font, int x, int y );
Todo
implement proper XFontSet support, when used with I18N enabled.
libAfterImage/asfont/get_asfont()
