# ***************************************************************************
#
# Fonts for tk -- api file.
#
# This module tries to provide a wee bit more abstract approach to
# specifying fonts than as in "-*-bollocks-*-*-37-" X-style font
# description.
#
# $Date: 2001/03/30 13:39:11 $
# $Revision: 3.0 $
# Author: cxl (Last modification by $Author: 2cxl $)
#
# (C) 1997, Bremen Institute for Safe Systems, Universitaet Bremen
#
# **************************************************************************
# Compiled by:
#
src/lib/tk/src/tk.sublibapi Fonts {
Font_Trait
=
BOLD
| ITALIC |
TINY
| SMALL | NORMAL_SIZE | LARGE | HUGE |
SCALE Float;
Font
=
XFONT String
| NORMAL_FONT List( Font_Trait )
| TYPEWRITER List( Font_Trait )
| SANS_SERIF List( Font_Trait )
| SYMBOL List( Font_Trait );
# Could (should?) have more here ...
# selectors and update functions
sel_font_conf: Font -> List( Font_Trait );
upd_font_conf: (Font, List( Font_Trait )) -> Font;
font_descr: Font -> String; /* get X-style font description */
# initialize fonts, check if all fonts exist etc.
# The argument is the library path, which should point to a directory
# where the xlsfonts script can be found
#
init: String -> Void;
# path to the xlsfonts executable. Exported here so we can check
# before startup if it exists (ows init above will hang)
#
get_testfont_path: String -> String;
# Configurations. You can here set the base size of the fonts,
# and the families from which the different fonts are chosen
# The string should contain the fndry and the family, as in
# Symbol = REF "-*-symbol"
font_config
:
{ normal_font: Ref( String ),
typewriter: Ref( String ),
sans_serif: Ref( String ),
symbol: Ref( String ),
base_size: Ref( Int ),
exact_match: Ref( Bool ),
resolution: Ref( Int )
};
# my init_config :
# { normal_g' : Ref (Bool * Bool -> String),
# typewriter_g' : Ref (Bool * Bool -> String),
# sans_serif_g' : Ref (Bool * Bool -> String),
# symbol_g' : Ref (Bool * Bool -> String)
# }
#
# my final_config :
# { normal_g: Ref (Bool * Bool * Int -> String),
# typewriter_g: Ref (Bool * Bool * Int -> String) ,
# sans_serif_g: Ref (Bool * Bool * Int -> String) ,
# symbol_g: Ref (Bool * Bool * Int -> String)
# }
};