]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/font.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "font.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 extern wxFontNameDirectory
*wxTheFontNameDirectory
;
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
28 class wxFontRefData
: public wxObjectRefData
35 wxList m_scaled_xfonts
;
37 int m_family
, m_style
, m_weight
;
48 wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER
)
50 m_byXFontName
= FALSE
;
57 m_faceName
= (char *) NULL
;
58 m_font
= (GdkFont
*) NULL
;
61 wxFontRefData::~wxFontRefData(void)
63 wxNode
*node
= m_scaled_xfonts
.First();
66 GdkFont
*font
= (GdkFont
*)node
->Data();
67 wxNode
*next
= node
->Next();
68 gdk_font_unref( font
);
74 m_faceName
= (char *) NULL
;
76 if (m_font
) gdk_font_unref( m_font
);
79 //-----------------------------------------------------------------------------
81 #define M_FONTDATA ((wxFontRefData *)m_refData)
83 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
87 if (wxTheFontList
) wxTheFontList
->Append( this );
90 wxFont::wxFont( char *xFontName
)
92 if (!xFontName
) return;
94 m_refData
= new wxFontRefData();
96 M_FONTDATA
->m_byXFontName
= TRUE
;
97 M_FONTDATA
->m_font
= gdk_font_load( xFontName
);
100 wxFont::wxFont(int PointSize
, int FontIdOrFamily
, int Style
, int Weight
,
101 bool Underlined
, const char* Face
)
103 m_refData
= new wxFontRefData();
105 if ((M_FONTDATA
->m_faceName
= (Face
) ? copystring(Face
) : (char*)NULL
) )
107 M_FONTDATA
->m_fontId
= wxTheFontNameDirectory
->FindOrCreateFontId( Face
, FontIdOrFamily
);
108 M_FONTDATA
->m_family
= wxTheFontNameDirectory
->GetFamily( FontIdOrFamily
);
112 M_FONTDATA
->m_fontId
= FontIdOrFamily
;
113 M_FONTDATA
->m_family
= wxTheFontNameDirectory
->GetFamily( FontIdOrFamily
);
115 if (Style
== wxDEFAULT
) Style
= wxSWISS
;
116 M_FONTDATA
->m_style
= Style
;
117 if (Weight
== wxDEFAULT
) Weight
= wxNORMAL
;
118 M_FONTDATA
->m_weight
= Weight
;
119 if (PointSize
== wxDEFAULT
) PointSize
= 10;
120 M_FONTDATA
->m_pointSize
= PointSize
;
121 M_FONTDATA
->m_underlined
= Underlined
;
123 if (wxTheFontList
) wxTheFontList
->Append( this );
126 wxFont::wxFont(int PointSize
, const char *Face
, int Family
, int Style
,
127 int Weight
, bool Underlined
)
129 m_refData
= new wxFontRefData();
131 M_FONTDATA
->m_fontId
= wxTheFontNameDirectory
->FindOrCreateFontId( Face
, Family
);
132 M_FONTDATA
->m_faceName
= (Face
) ? copystring(Face
) : (char*)NULL
;
133 M_FONTDATA
->m_family
= wxTheFontNameDirectory
->GetFamily( M_FONTDATA
->m_fontId
);
134 M_FONTDATA
->m_style
= Style
;
135 M_FONTDATA
->m_weight
= Weight
;
136 M_FONTDATA
->m_pointSize
= PointSize
;
137 M_FONTDATA
->m_underlined
= Underlined
;
139 if (wxTheFontList
) wxTheFontList
->Append( this );
142 wxFont::wxFont( const wxFont
& font
)
146 if (wxTheFontList
) wxTheFontList
->Append( this );
149 wxFont::wxFont( const wxFont
* font
)
152 if (font
) Ref( *font
);
154 if (wxTheFontList
) wxTheFontList
->Append( this );
157 wxFont::~wxFont(void)
159 if (wxTheFontList
) wxTheFontList
->DeleteObject( this );
162 wxFont
& wxFont::operator = ( const wxFont
& font
)
164 if (*this == font
) return (*this);
169 bool wxFont::operator == ( const wxFont
& font
)
171 return m_refData
== font
.m_refData
;
174 bool wxFont::operator != ( const wxFont
& font
)
176 return m_refData
!= font
.m_refData
;
179 bool wxFont::Ok() const
181 return (m_refData
!= NULL
);
184 int wxFont::GetPointSize(void) const
188 wxFAIL_MSG( "invalid font" );
192 return M_FONTDATA
->m_pointSize
;
195 wxString
wxFont::GetFaceString(void) const
199 wxFAIL_MSG( "invalid font" );
203 wxString s
= wxTheFontNameDirectory
->GetFontName( M_FONTDATA
->m_fontId
);
207 wxString
wxFont::GetFaceName(void) const
211 wxFAIL_MSG( "invalid font" );
215 wxString s
= wxTheFontNameDirectory
->GetFontName( M_FONTDATA
->m_fontId
);
219 int wxFont::GetFamily(void) const
223 wxFAIL_MSG( "invalid font" );
227 return M_FONTDATA
->m_family
;
230 wxString
wxFont::GetFamilyString(void) const
234 wxFAIL_MSG( "invalid font" );
238 switch (M_FONTDATA
->m_family
)
240 case wxDECORATIVE
: return wxString("wxDECORATIVE");
241 case wxROMAN
: return wxString("wxROMAN");
242 case wxSCRIPT
: return wxString("wxSCRIPT");
243 case wxSWISS
: return wxString("wxSWISS");
244 case wxMODERN
: return wxString("wxMODERN");
245 case wxTELETYPE
: return wxString("wxTELETYPE");
246 default: return "wxDEFAULT";
252 int wxFont::GetFontId(void) const
256 wxFAIL_MSG( "invalid font" );
260 return M_FONTDATA
->m_fontId
; // stub
263 int wxFont::GetStyle(void) const
267 wxFAIL_MSG( "invalid font" );
271 return M_FONTDATA
->m_style
;
274 wxString
wxFont::GetStyleString(void) const
278 wxFAIL_MSG( "invalid font" );
282 switch (M_FONTDATA
->m_style
)
284 case wxNORMAL
: return wxString("wxNORMAL");
285 case wxSLANT
: return wxString("wxSLANT");
286 case wxITALIC
: return wxString("wxITALIC");
287 default: return wxString("wxDEFAULT");
290 return wxString("wxDEFAULT");
293 int wxFont::GetWeight(void) const
297 wxFAIL_MSG( "invalid font" );
301 return M_FONTDATA
->m_weight
;
304 wxString
wxFont::GetWeightString(void) const
308 wxFAIL_MSG( "invalid font" );
312 switch (M_FONTDATA
->m_weight
)
314 case wxNORMAL
: return wxString("wxNORMAL");
315 case wxBOLD
: return wxString("wxBOLD");
316 case wxLIGHT
: return wxString("wxLIGHT");
317 default: return wxString("wxDEFAULT");
320 return wxString("wxDEFAULT");
323 bool wxFont::GetUnderlined(void) const
327 wxFAIL_MSG( "invalid font" );
331 return M_FONTDATA
->m_underlined
;
334 //-----------------------------------------------------------------------------
335 // get internal representation of font
336 //-----------------------------------------------------------------------------
338 // local help function
339 static GdkFont
*wxLoadQueryNearestFont(int point_size
, int fontid
,
340 int style
, int weight
,
343 GdkFont
*wxFont::GetInternalFont(float scale
) const
347 wxFAIL_MSG( "invalid font" );
348 return (GdkFont
*) NULL
;
351 if (M_FONTDATA
->m_byXFontName
) return M_FONTDATA
->m_font
;
353 long int_scale
= long(scale
* 100.0 + 0.5); // key for fontlist
354 int point_scale
= (M_FONTDATA
->m_pointSize
* 10 * int_scale
) / 100;
355 GdkFont
*font
= (GdkFont
*) NULL
;
357 wxNode
*node
= M_FONTDATA
->m_scaled_xfonts
.Find(int_scale
);
360 font
= (GdkFont
*)node
->Data();
364 font
= wxLoadQueryNearestFont( point_scale
, M_FONTDATA
->m_fontId
, M_FONTDATA
->m_style
,
365 M_FONTDATA
->m_weight
, M_FONTDATA
->m_underlined
);
366 M_FONTDATA
->m_scaled_xfonts
.Append( int_scale
, (wxObject
*)font
);
369 printf("could not load any font");
370 // wxError("could not load any font", "wxFont");
374 //-----------------------------------------------------------------------------
375 // local utilities to find a X font
376 //-----------------------------------------------------------------------------
378 static GdkFont
*wxLoadQueryFont(int point_size
, int fontid
, int style
,
379 int weight
, bool WXUNUSED(underlined
))
382 char *name
= wxTheFontNameDirectory
->GetScreenName( fontid
, weight
, style
);
385 name
= "-*-*-*-*-*-*-*-%d-*-*-*-*-*-*";
386 sprintf(buffer
, name
, point_size
);
388 return gdk_font_load( buffer
);
391 static GdkFont
*wxLoadQueryNearestFont(int point_size
, int fontid
,
392 int style
, int weight
,
397 font
= wxLoadQueryFont( point_size
, fontid
, style
, weight
, underlined
);
400 // search up and down by stepsize 10
401 int max_size
= point_size
+ 20 * (1 + (point_size
/180));
402 int min_size
= point_size
- 20 * (1 + (point_size
/180));
405 // Search for smaller size (approx.)
406 for (i
=point_size
-10; !font
&& i
>= 10 && i
>= min_size
; i
-= 10)
407 font
= wxLoadQueryFont(i
, fontid
, style
, weight
, underlined
);
408 // Search for larger size (approx.)
409 for (i
=point_size
+10; !font
&& i
<= max_size
; i
+= 10)
410 font
= wxLoadQueryFont(i
, fontid
, style
, weight
, underlined
);
411 // Try default family
412 if (!font
&& fontid
!= wxDEFAULT
)
413 font
= wxLoadQueryFont(point_size
, wxDEFAULT
, style
,
417 font
= wxLoadQueryFont(120, wxDEFAULT
, wxNORMAL
, wxNORMAL
,
423 //-----------------------------------------------------------------------------
424 // face names and index functions
425 //-----------------------------------------------------------------------------
427 static char *font_defaults
[] = {
428 "FamilyDefault", "Default",
429 "FamilyRoman", "Roman",
430 "FamilyDecorative", "Decorative",
431 "FamilyModern", "Modern",
432 "FamilyTeletype", "Teletype",
433 "FamilySwiss", "Swiss",
434 "FamilyScript", "Script",
440 "AfmItalic", "${AfmSlant}",
444 "AfmHelvetica", "Helv",
445 "AfmCourier", "Cour",
447 "Afm___", "${AfmTimes,$[weight],$[style]}",
449 "AfmTimes__", "${AfmTimes}${Afm$[weight]}${Afm$[style]}",
450 "AfmTimesMediumStraight", "${AfmTimes}${AfmRoman}",
451 "AfmTimesLightStraight", "${AfmTimes}${AfmRoman}",
452 "AfmTimes_Italic", "${AfmTimes}$[weight]${AfmItalic}",
453 "AfmTimes_Slant", "${AfmTimes}$[weight]${AfmItalic}",
455 "AfmSwiss__", "${AfmHelvetica}${Afm$[weight]}${Afm$[style]}",
456 "AfmModern__", "${AfmCourier}${Afm$[weight]}${Afm$[style]}",
458 "AfmTeletype__", "${AfmModern,$[weight],$[style]}",
460 "PostScriptMediumStraight", "",
461 "PostScriptMediumItalic", "-Oblique",
462 "PostScriptMediumSlant", "-Oblique",
463 "PostScriptLightStraight", "",
464 "PostScriptLightItalic", "-Oblique",
465 "PostScriptLightSlant", "-Oblique",
466 "PostScriptBoldStraight", "-Bold",
467 "PostScriptBoldItalic", "-BoldOblique",
468 "PostScriptBoldSlant", "-BoldOblique",
470 #if WX_NORMALIZED_PS_FONTS
471 "PostScript___", "${PostScriptTimes,$[weight],$[style]}",
473 "PostScriptRoman__", "${PostScriptTimes,$[weight],$[style]}",
474 "PostScript___", "LucidaSans${PostScript$[weight]$[style]}",
477 "PostScriptTimesMedium", "",
478 "PostScriptTimesLight", "",
479 "PostScriptTimesBold", "Bold",
481 "PostScriptTimes__", "Times${PostScript$[weight]$[style]}",
482 "PostScriptTimesMediumStraight", "Times-Roman",
483 "PostScriptTimesLightStraight", "Times-Roman",
484 "PostScriptTimes_Slant", "Times-${PostScriptTimes$[weight]}Italic",
485 "PostScriptTimes_Italic", "Times-${PostScriptTimes$[weight]}Italic",
487 "PostScriptSwiss__", "Helvetica${PostScript$[weight]$[style]}",
488 "PostScriptModern__", "Courier${PostScript$[weight]$[style]}",
490 "PostScriptTeletype__", "${PostScriptModern,$[weight],$[style]}",
492 #if !WX_NORMALIZED_PS_FONTS
493 "PostScriptScript__", "Zapf-Chancery-MediumItalic",
496 "ScreenMedium", "medium",
497 "ScreenBold", "bold",
498 "ScreenLight", "light",
499 "ScreenStraight", "r",
503 "ScreenDefaultBase", "misc-fixed",
504 "ScreenRomanBase", "*-times",
505 "ScreenDecorativeBase", "*-helvetica",
506 "ScreenModernBase", "*-courier",
507 "ScreenTeletypeBase", "*-lucidatypewriter",
508 "ScreenSwissBase", "*-lucida",
509 "ScreenScriptBase", "*-zapfchancery",
511 "ScreenStdSuffix", "-${Screen$[weight]}-${Screen$[style]}"
512 "-normal-*-*-%d-*-*-*-*-*-*",
515 "-${ScreenDefaultBase}${ScreenStdSuffix}",
517 "-${ScreenRomanBase}${ScreenStdSuffix}",
518 "ScreenDecorative__",
519 "-${ScreenDecorativeBase}${ScreenStdSuffix}",
521 "-${ScreenModernBase}${ScreenStdSuffix}",
523 "-${ScreenTeletypeBase}${ScreenStdSuffix}",
525 "-${ScreenSwissBase}${ScreenStdSuffix}",
527 "-${ScreenScriptBase}${ScreenStdSuffix}",
531 enum {wxWEIGHT_NORMAL
, wxWEIGHT_BOLD
, wxWEIGHT_LIGHT
, wxNUM_WEIGHTS
};
532 enum {wxSTYLE_NORMAL
, wxSTYLE_ITALIC
, wxSTYLE_SLANT
, wxNUM_STYLES
};
534 static int WCoordinate(int w
)
537 case wxBOLD
: return wxWEIGHT_BOLD
;
538 case wxLIGHT
: return wxWEIGHT_LIGHT
;
540 default: return wxWEIGHT_NORMAL
;
544 static int SCoordinate(int s
)
547 case wxITALIC
: return wxSTYLE_ITALIC
;
548 case wxSLANT
: return wxSTYLE_SLANT
;
550 default: return wxSTYLE_NORMAL
;
554 //-----------------------------------------------------------------------------
556 //-----------------------------------------------------------------------------
562 inline char *GetName(int weight
, int style
)
564 return ( map
[WCoordinate(weight
)] [SCoordinate(style
)] );
567 char *map
[wxNUM_WEIGHTS
][wxNUM_STYLES
];
568 void Initialize(const char *, const char *);
572 #define wxGetResource(a, b, c) 0
575 static void SearchResource(const char *prefix
, const char **names
, int count
, char **v
)
578 char resource
[1024], **defaults
, *internal
;
583 internal
= (char *) NULL
;
585 for (i
= 0; i
< k
; i
++) {
586 strcpy(resource
, prefix
);
587 for (j
= 0; j
< count
; j
++) {
589 strcat(resource
, names
[j
]);
591 strcat(resource
, "_");
593 if (wxGetResource(wxAPP_CLASS
, (char *)resource
, v
))
596 defaults
= font_defaults
;
598 if (!strcmp(*defaults
, resource
)) {
599 internal
= defaults
[1];
607 *v
= copystring(internal
);
610 wxSuffixMap::~wxSuffixMap(void)
614 for (k
= 0; k
< wxNUM_WEIGHTS
; ++k
)
615 for (j
= 0; j
< wxNUM_STYLES
; ++j
)
618 map
[k
][j
] = (char *) NULL
;
622 void wxSuffixMap::Initialize(const char *resname
, const char *devresname
)
624 const char *weight
, *style
;
627 const char *names
[3];
629 for (k
= 0; k
< wxNUM_WEIGHTS
; k
++) {
631 case wxWEIGHT_NORMAL
: weight
= "Medium"; break;
632 case wxWEIGHT_LIGHT
: weight
= "Light"; break;
634 default: weight
= "Bold";
636 for (j
= 0; j
< wxNUM_STYLES
; j
++) {
638 case wxSTYLE_NORMAL
: style
= "Straight"; break;
639 case wxSTYLE_ITALIC
: style
= "Italic"; break;
641 default: style
= "Slant";
647 SearchResource(devresname
, names
, 3, &v
);
649 /* Expand macros in the found string: */
651 int len
, closer
= 0, startpos
= 0;
653 len
= (v
? strlen(v
) : 0);
654 for (i
= 0; i
< len
; i
++) {
655 if (v
[i
] == '$' && ((v
[i
+1] == '[') || (v
[i
+1] == '{'))) {
657 closer
= (v
[i
+1] == '[') ? ']' : '}';
659 } else if (v
[i
] == closer
) {
661 const char *r
= (char *) NULL
; bool delete_r
= FALSE
;
664 name
= v
+ startpos
+ 2;
671 for (i
= 0, count
= 1; name
[i
]; i
++)
677 names
= new char*[count
];
679 for (i
= 0, count
= 1; i
< len
; i
++)
680 if (name
[i
] == ',') {
681 names
[count
++] = name
+ i
+ 1;
685 SearchResource("", (const char **)names
, count
, (char **)&r
);
690 for (i
= 0; i
< len
; i
++)
694 printf("Bad resource name \"%s\" in font lookup\n", name
);
696 } else if (!strcmp(name
, "weight")) {
698 } else if (!strcmp(name
, "style")) {
700 } else if (!strcmp(name
, "family")) {
704 printf("Bad font macro name \"%s\"\n", name
);
708 newstrlen
= strlen(r
);
709 char *naya
= new char[startpos
+ newstrlen
+ len
- i
];
710 memcpy(naya
, v
, startpos
);
711 memcpy(naya
+ startpos
, r
, newstrlen
);
712 memcpy(naya
+ startpos
+ newstrlen
, v
+ i
+ 1, len
- i
);
721 /* We have a final value: */
727 //-----------------------------------------------------------------------------
729 //-----------------------------------------------------------------------------
731 class wxFontNameItem
: public wxObject
{
732 DECLARE_DYNAMIC_CLASS(wxFontNameItem
)
734 wxFontNameItem(const char *name
, int id
, int family
);
737 inline char* GetScreenName(int w
, int s
) {return screen
.GetName(w
, s
);}
738 inline char* GetPostScriptName(int w
, int s
) {return printing
.GetName(w
, s
);}
739 inline char* GetAFMName(int w
, int s
) {return afm
.GetName(w
, s
);}
740 inline char* GetName(void) {return name
;}
741 inline int GetFamily(void) {return family
;}
742 inline int GetId(void) {return id
;}
743 inline bool IsRoman(void) {return isroman
;}
745 void Dump(ostream
& str
);
751 wxSuffixMap screen
, printing
, afm
;
755 IMPLEMENT_ABSTRACT_CLASS(wxFontNameItem
, wxObject
)
757 wxFontNameItem::wxFontNameItem(const char *Name
, int Id
, int Family
)
759 name
= copystring(Name
);
763 screen
. Initialize(name
, "Screen");
764 printing
.Initialize(name
, "PostScript");
765 afm
. Initialize(name
, "Afm");
768 wxFontNameItem::~wxFontNameItem(void)
772 name
= (char *) NULL
;
776 void wxFontNameItem::Dump(ostream
& str
)
778 str
<< "wxFontNameItem(" << name
<< ")";
782 //-----------------------------------------------------------------------------
784 //-----------------------------------------------------------------------------
786 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
788 wxFontNameDirectory::wxFontNameDirectory(void)
790 table
= new wxHashTable(wxKEY_INTEGER
, 20);
794 wxFontNameDirectory::~wxFontNameDirectory()
796 // Cleanup wxFontNameItems allocated
798 wxNode
*node
= table
->Next();
800 wxFontNameItem
*item
= (wxFontNameItem
*)node
->Data();
802 node
= table
->Next();
807 int wxFontNameDirectory::GetNewFontId(void)
809 return (nextFontId
--);
812 void wxFontNameDirectory::Initialize()
814 Initialize(wxDEFAULT
, wxDEFAULT
, "Default");
815 Initialize(wxDECORATIVE
, wxDECORATIVE
, "Decorative");
816 Initialize(wxROMAN
, wxROMAN
, "Roman");
817 Initialize(wxMODERN
, wxMODERN
, "Modern");
818 Initialize(wxTELETYPE
, wxTELETYPE
, "Teletype");
819 Initialize(wxSWISS
, wxSWISS
, "Swiss");
820 Initialize(wxSCRIPT
, wxSCRIPT
, "Script");
823 void wxFontNameDirectory::Initialize(int fontid
, int family
, const char *resname
)
825 char *fam
, resource
[256];
827 sprintf(resource
, "Family%s", resname
);
828 SearchResource((const char *)resource
, (const char **) NULL
, 0, (char **)&fam
);
830 if (!strcmp(fam
, "Default")) family
= wxDEFAULT
;
831 else if (!strcmp(fam
, "Roman")) family
= wxROMAN
;
832 else if (!strcmp(fam
, "Decorative")) family
= wxDECORATIVE
;
833 else if (!strcmp(fam
, "Modern")) family
= wxMODERN
;
834 else if (!strcmp(fam
, "Teletype")) family
= wxTELETYPE
;
835 else if (!strcmp(fam
, "Swiss")) family
= wxSWISS
;
836 else if (!strcmp(fam
, "Script")) family
= wxSCRIPT
;
837 delete[] fam
; // free resource
839 table
->Put(fontid
, new wxFontNameItem(resname
, fontid
, family
));
842 int wxFontNameDirectory::FindOrCreateFontId(const char *name
, int family
)
846 // font exists -> return id
847 if ( (id
= GetFontId(name
)) ) return id
;
849 Initialize(id
=GetNewFontId(), family
, name
);
853 char *wxFontNameDirectory::GetScreenName(int fontid
, int weight
, int style
)
855 wxFontNameItem
*item
= (wxFontNameItem
*)table
->Get(fontid
); // find font
857 return item
->GetScreenName(weight
, style
);
858 // font does not exist
859 return (char *) NULL
;
862 char *wxFontNameDirectory::GetPostScriptName(int fontid
, int weight
, int style
)
864 wxFontNameItem
*item
= (wxFontNameItem
*)table
->Get(fontid
); // find font
866 return item
->GetPostScriptName(weight
, style
);
867 // font does not exist
868 return (char *) NULL
;
871 char *wxFontNameDirectory::GetAFMName(int fontid
, int weight
, int style
)
873 wxFontNameItem
*item
= (wxFontNameItem
*)table
->Get(fontid
); // find font
875 return item
->GetAFMName(weight
, style
);
876 // font does not exist
877 return (char *) NULL
;
880 char *wxFontNameDirectory::GetFontName(int fontid
)
882 wxFontNameItem
*item
= (wxFontNameItem
*)table
->Get(fontid
); // find font
884 return item
->GetName();
885 // font does not exist
886 return (char *) NULL
;
889 int wxFontNameDirectory::GetFontId(const char *name
)
895 while ( (node
= table
->Next()) ) {
896 wxFontNameItem
*item
= (wxFontNameItem
*)node
->Data();
897 if (!strcmp(name
, item
->name
))
900 // font does not exist
904 int wxFontNameDirectory::GetFamily(int fontid
)
906 wxFontNameItem
*item
= (wxFontNameItem
*)table
->Get(fontid
);
910 // font does not exist