Re: Pango Font Issue



[Sorry for the late reply.]

On Thu, 2005-07-14 at 23:01 +0200, Firmicus ankabut net wrote:

At some stage I would like to test whether a particular glyph is
available in the active Arabic font, so that if not, an alternative
glyph can be displayed instead.

I found that pango_fc_font_has_char() in the Pango C library would do
the job. 

Am I right that this function has not been bound to Gtk2::Pango yet?

Yes, you are right.  The problem with this function and other's of its
type is that they are not really public.  They're usually wrapped inside

  #if defined(PANGO_ENABLE_ENGINE) || defined(PANGO_ENABLE_BACKEND)
  ...
  #endif

This means that only engines and backends should use them.  That's
basically a no-go sign for language bindings.

What alternatives do exist?

I don't see any alternative function in the public API that would do
what you want.  What you could do, though, is to ask (on IRC or
bugzilla) whether the Pango devs would include a generic
pango_font_has_char() which would call the backend specific function for
fonts that support it, and barf otherwise.  This function could then be
wrapped inside Gtk2::Pango.

Or you could create a separate module (named Gtk2::PangoFc for example)
that wraps all the FontConfig specific Pango stuff.  Seeing that the
backends are all properly GObject-ified, it should be doable.

-- 
Bye,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]