Re: unix part of project


Subject: Re: unix part of project
From: Paul Rohr (paul@abisource.com)
Date: Thu Mar 23 2000 - 09:41:32 CST


At 05:11 PM 3/20/00 +0200, Vadim Frolov wrote:
>I have a little questions to developers .

There are many folks on this list who know more about the GTK implementation
than I do, but here are some suggestions based on a quick read of the code.
YMMV.

>1. Can I get a font encoding string for current font (such as
>"-iso-8859-1, -koi8-r, -windows-cp1250")
>when I inside GR_UnixGraphics::DrawChars? And how if I can? I don't want
>to parse fonts.dir.

The current font (m_pFont) is an XAP_UnixFont, from which you can access the
underlying GDKFont. Thus, there are two approaches to try:

1. I presume that there are GDK/GTK apis you can call to get the encoding
for a GDKFont object.

2. If not, you can extend the XAP_UnixFont interface to get it from there,
since it stores its own m_xlfd, which can be parsed using an
XAP_UnixFontXLFD.

>2. How to switch current font to another ?

Take a look at the implementations for GR_UnixGraphics::findFont() and
GR_UnixGraphics::setFont() for clues.

Paul



This archive was generated by hypermail 2b25 : Thu Mar 23 2000 - 09:36:01 CST