bool wxNativeEncodingInfo::FromString(const wxString& s)
{
// use ";", not "-" because it may be part of encoding name
bool wxNativeEncodingInfo::FromString(const wxString& s)
{
// use ";", not "-" because it may be part of encoding name
bool wxNativeFontInfo::FromXFontName(const wxString& fontname)
{
// TODO: we should be able to handle the font aliases here, but how?
bool wxNativeFontInfo::FromXFontName(const wxString& fontname)
{
// TODO: we should be able to handle the font aliases here, but how?
// skip the leading, usually empty field (font name registry)
if ( !tokenizer.HasMoreTokens() )
// skip the leading, usually empty field (font name registry)
if ( !tokenizer.HasMoreTokens() )
// this class should be initialized with a valid font spec first and only
// then the fields may be modified!
// this class should be initialized with a valid font spec first and only
// then the fields may be modified!
wxFontWeight wxNativeFontInfo::GetWeight() const
{
const wxString s = GetXFontComponent(wxXLFD_WEIGHT).MakeLower();
wxFontWeight wxNativeFontInfo::GetWeight() const
{
const wxString s = GetXFontComponent(wxXLFD_WEIGHT).MakeLower();
{
// and wxWidgets family -- to X foundry, but we have to translate it to
// wxFontFamily somehow...
{
// and wxWidgets family -- to X foundry, but we have to translate it to
// wxFontFamily somehow...
wxFontEncoding wxNativeFontInfo::GetEncoding() const
{
// we already have the code for this but need to refactor it first
wxFontEncoding wxNativeFontInfo::GetEncoding() const
{
// we already have the code for this but need to refactor it first
void wxNativeFontInfo::SetFamily(wxFontFamily WXUNUSED(family))
{
// wxFontFamily -> X foundry, anyone?
void wxNativeFontInfo::SetFamily(wxFontFamily WXUNUSED(family))
{
// wxFontFamily -> X foundry, anyone?
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
- fontspec.Printf(_T("-*-%s-*-*-*-*-*-*-*-*-*-*-%s-%s"),
- !info.facename ? _T("*") : info.facename.c_str(),
+ fontspec.Printf(wxT("-*-%s-*-*-*-*-*-*-*-*-*-*-%s-%s"),
+ !info.facename ? wxT("*") : info.facename.c_str(),
font = wxLoadQueryFont(-1,
wxDEFAULT, wxNORMAL, wxNORMAL,
false, wxEmptyString,
font = wxLoadQueryFont(-1,
wxDEFAULT, wxNORMAL, wxNORMAL,
false, wxEmptyString,
{
// some X servers will fail to load this font because there are too many
// matches so we must test explicitly for this
{
// some X servers will fail to load this font because there are too many
// matches so we must test explicitly for this