ARB
Macros | Typedefs | Functions | Variables
AW_xfont.cxx File Reference
#include "aw_xfont.hxx"
#include "aw_root.hxx"
#include <arbdb.h>
#include <cctype>
Include dependency graph for AW_xfont.cxx:

Go to the source code of this file.

Macros

#define FONT_EXAMINE_MAX   5000
 
#define KNOWN_ISO_VERSIONS   3
 
#define PREFER_ISO10646
 
#define FONT_STRING_PARTS   14
 
#define DEFAULT   (-1)
 

Typedefs

typedef XFontStruct * PIX_FONT
 

Functions

 STATIC_ASSERT (ARRAY_ELEMS(x_fontinfo)==AW_NUM_FONTS)
 
 STATIC_ASSERT (ARRAY_ELEMS(ps_fontinfo)==AW_NUM_FONTS+1)
 
static void check_ps_fontinfo_valid ()
 
static const charparseFontString (const char *fontname, int *minus_position)
 
static chargetParsedFontPart (const char *fontname, int *minus_position, int idx)
 
static int parsesize (const char *fontname)
 
void aw_root_init_font (Display *display)
 
static bool lookfont (Display *tool_d, int f, int s, int &found_size, bool verboose, bool only_query, PIX_FONT *fontstPtr)
 
static int get_available_fontsizes (Display *tool_d, int f, int *available_sizes)
 
static charcaps (char *sentence)
 
const charAW_get_font_specification (AW_font font_nr, bool &found)
 
const charAW_get_font_shortname (AW_font font_nr)
 
int AW_font_2_xfig (AW_font font_nr)
 
bool CI_NonExistChar (const XCharStruct *cs)
 
void CI_GetCharInfo_1D (const XFontStruct *fs, unsigned col, const XCharStruct *def, const XCharStruct *&cs)
 
void CI_GetDefaultInfo_1D (const XFontStruct *fs, const XCharStruct *&cs)
 
void CI_GetCharInfo_2D (const XFontStruct *fs, unsigned row, unsigned col, const XCharStruct *def, const XCharStruct *&cs)
 
void CI_GetDefaultInfo_2D (const XFontStruct *fs, const XCharStruct *&cs)
 
void CI_GetRowzeroCharInfo_2D (const XFontStruct *fs, unsigned col, const XCharStruct *def, const XCharStruct *&cs)
 

Variables

static bool openwinfonts
 
static bool is_scalable [AW_NUM_FONTS]
 
static const charknown_iso_versions [KNOWN_ISO_VERSIONS] = { "ISO10646", "ISO8859", "*" }
 
static struct _xfstruct x_fontinfo []
 
static struct _fstruct ps_fontinfo []
 

Macro Definition Documentation

#define FONT_EXAMINE_MAX   5000

Definition at line 24 of file AW_xfont.cxx.

Referenced by aw_root_init_font().

#define KNOWN_ISO_VERSIONS   3

Definition at line 25 of file AW_xfont.cxx.

Referenced by aw_root_init_font(), and lookfont().

#define PREFER_ISO10646

Definition at line 41 of file AW_xfont.cxx.

#define FONT_STRING_PARTS   14

Definition at line 246 of file AW_xfont.cxx.

Referenced by getParsedFontPart(), and parseFontString().

#define DEFAULT   (-1)

Definition at line 472 of file AW_xfont.cxx.

Referenced by lookfont().

Typedef Documentation

typedef XFontStruct* PIX_FONT

Definition at line 34 of file AW_xfont.cxx.

Function Documentation

STATIC_ASSERT ( ARRAY_ELEMS(x_fontinfo = =AW_NUM_FONTS)
STATIC_ASSERT ( ARRAY_ELEMS(ps_fontinfo = =AW_NUM_FONTS+1)
static void check_ps_fontinfo_valid ( )
static
static const char* parseFontString ( const char fontname,
int minus_position 
)
static

Definition at line 248 of file AW_xfont.cxx.

References error(), FONT_STRING_PARTS, and NULp.

Referenced by AW_get_font_specification(), and parsesize().

static char* getParsedFontPart ( const char fontname,
int minus_position,
int  idx 
)
static

Definition at line 261 of file AW_xfont.cxx.

References aw_assert, FONT_STRING_PARTS, length, and result.

Referenced by AW_get_font_specification(), and parsesize().

static int parsesize ( const char fontname)
static

Definition at line 278 of file AW_xfont.cxx.

References error(), GBS_global_string(), getParsedFontPart(), and parseFontString().

Referenced by aw_root_init_font().

void aw_root_init_font ( Display *  display)
static bool lookfont ( Display *  tool_d,
int  f,
int  s,
int found_size,
bool  verboose,
bool  only_query,
PIX_FONT fontstPtr 
)
static
static int get_available_fontsizes ( Display *  tool_d,
int  f,
int available_sizes 
)
static

Definition at line 621 of file AW_xfont.cxx.

References ASSERT_TRUE, aw_assert, lookfont(), MAX_FONTSIZE, MIN_FONTSIZE, and s.

Referenced by AW_GC_Xm::get_available_fontsizes().

static char* caps ( char sentence)
static

Definition at line 651 of file AW_xfont.cxx.

Referenced by AW_get_font_specification().

const char* AW_get_font_specification ( AW_font  font_nr,
bool &  found 
)
const char* AW_get_font_shortname ( AW_font  font_nr)

Definition at line 721 of file AW_xfont.cxx.

References aw_assert, AW_NUM_FONTS, and _xfstruct::description.

Referenced by AW_gc_manager::update_gc_font().

int AW_font_2_xfig ( AW_font  font_nr)

converts fontnr to xfigid

Definition at line 726 of file AW_xfont.cxx.

References AW_NUM_FONTS, and _fstruct::xfontnum.

Referenced by check_ps_fontinfo_valid(), and font_has_fixed_width().

bool CI_NonExistChar ( const XCharStruct *  cs)
inline

Definition at line 735 of file AW_xfont.cxx.

Referenced by CI_GetCharInfo_1D(), CI_GetCharInfo_2D(), and CI_GetRowzeroCharInfo_2D().

void CI_GetCharInfo_1D ( const XFontStruct *  fs,
unsigned  col,
const XCharStruct *  def,
const XCharStruct *&  cs 
)
inline

Definition at line 741 of file AW_xfont.cxx.

References aw_assert, and CI_NonExistChar().

Referenced by CI_GetDefaultInfo_1D().

void CI_GetDefaultInfo_1D ( const XFontStruct *  fs,
const XCharStruct *&  cs 
)
inline

Definition at line 755 of file AW_xfont.cxx.

References CI_GetCharInfo_1D(), and NULp.

void CI_GetCharInfo_2D ( const XFontStruct *  fs,
unsigned  row,
unsigned  col,
const XCharStruct *  def,
const XCharStruct *&  cs 
)
inline

Definition at line 763 of file AW_xfont.cxx.

References CI_NonExistChar().

Referenced by CI_GetDefaultInfo_2D().

void CI_GetDefaultInfo_2D ( const XFontStruct *  fs,
const XCharStruct *&  cs 
)
inline

Definition at line 781 of file AW_xfont.cxx.

References CI_GetCharInfo_2D(), and NULp.

void CI_GetRowzeroCharInfo_2D ( const XFontStruct *  fs,
unsigned  col,
const XCharStruct *  def,
const XCharStruct *&  cs 
)
inline

Definition at line 794 of file AW_xfont.cxx.

References CI_NonExistChar().

Variable Documentation

bool openwinfonts
static

Definition at line 36 of file AW_xfont.cxx.

Referenced by aw_root_init_font(), and lookfont().

bool is_scalable[AW_NUM_FONTS]
static

Definition at line 37 of file AW_xfont.cxx.

Referenced by aw_root_init_font(), and lookfont().

const char* known_iso_versions[KNOWN_ISO_VERSIONS] = { "ISO10646", "ISO8859", "*" }
static

Definition at line 52 of file AW_xfont.cxx.

struct _xfstruct x_fontinfo[]
static

Definition at line 57 of file AW_xfont.cxx.

struct _fstruct ps_fontinfo[]
static

Definition at line 137 of file AW_xfont.cxx.