Re: [gtk-i18n-list] Rendering a custom glyph using pango



I am using ubuntu linux and tried to insert the string into a GtkTextBuffer using gtk_text_buffer_insert after calling g_locale_to_utf8 on the value. Maybe, my syntax is wrong.

For a value such as 46DB, I first call g_strdup_printf("%s", "\u46DB") and the gchar * that is returned is what I pass into g_locale_to_utf8.

For a value like 10005, it looks like I cannot use the above method like \u46DB.

Apart from making it work, I am also curious to know which part of the code actually loads the font file and extracts the glyph and how the code flow occurs from gtk through pango. 

Thanks a lot,
-Ferdinand

--- On Mon, 2/13/12, suzuki toshiya <mpsuzuki hiroshima-u ac jp> wrote:

> From: suzuki toshiya <mpsuzuki hiroshima-u ac jp>
> Subject: Re: [gtk-i18n-list] Rendering a custom glyph using pango
> To: "Ferdinand Ramirez" <ramirez ferdinand yahoo com>
> Cc: gtk-i18n-list gnome org
> Date: Monday, February 13, 2012, 7:19 PM
> Hi,
> 
> Excuse me, I think Pango does not reject the rendering for
> the characters at PUA codepoints, so, if you cannot find
> the expected result (e.g. the codepoint is displayed by
> unexpected/unwanted font), there is a possibility that
> Pango could not find the expected font when PUA codepoints
> are being rendered.
> 
> How Pango search/select the font is platform dependent, but
> I could not guess which platform you are using. Could you
> post more detailed description of your problem?
> 
> Regards,
> mpsuzuki
> 
> Ferdinand Ramirez wrote:
> > How can I control from C code the display of a random
> glyph that I have created and added to a ttf font file with
> a unicode value that is in the private user area? Say I have
> assigned the value 22222 and need to display the
> corresponding glyph. Can I also map a totally random code
> and get it to work?
> > 
> > How does this work? Which code does the control go
> through?
> > 
> > On a related note, what if I want to display the same
> glyph in gtk text area or on a gtk label? How would I do
> that? I am able to do it for regular unicode values by
> setting the font but noticed that it does not work when I
> add the glyph to the private range and try to add the code
> from the private range to the buffer.
> > 
> > Thanks,
> > -Ferdinand
> > _______________________________________________
> > gtk-i18n-list mailing list
> > gtk-i18n-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
> 
> 


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