Re: Upright glyphs with combining marks in vertical text.
On Sun, 2017-09-10 at 04:24 -0700, Behdad Esfahbod wrote: > Care filing a bug please, so we don't lose? https://bugzilla.gnome.org/show_bug.cgi?id=787526 id="-x-evo-selection- start-marker"> On Sun, Sep 10, 2017 at 4:24 AM, Behdad Esfahbodwrote: > Renders fine with hb-view, but broken with pango-view. > I'll take a look. > > On Thu, Sep 7, 2017 at 1:34 AM, Tavmjong Bah > wrote: > > On Wed, 2017-09-06 at 12:24 -0700, Behdad Esfahbod wrote: > > > > > Pictures please? > > > > > > > > Attached. > > > > > > > > > On Wed, Sep 6, 2017 at 12:07 PM, Tavmjong Bah > > > > > wrote: > > > > > > Hi, > > > > > > > > > > > > I've got two questions about rendering characters with > > combining > > > > > > marks > > > > > > (as one might have with CSS "writing-mode:vertical;text- > > > > > > orientation:upright"). > > > > > > > > > > > > It appears that Pango misplaces the marks as shown by: > > > > > > > > > > > > pango-view --annotate=2 --dpi=160 --gravity=east --gravity- > > > > > > hint=strong > > > > > > --rotate=-90 test-combining.txt > > > > > > > > > > > > where test-combining.txt has the following characters: > > > > > > > > > > > > G̃g̃X̃x̃ > > > > > > > > > > > > 1. Is this a bug? Or am I doing something wrong? > > > > > > > > > > > > 2. Shouldn't the width in PangoGlyphGeometry be the vertical > > height > > > > > > when typeset in upright vertical mode (with combining marks > > having > > > > > > a > > > > > > vertical height of zero)? > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Tav > > > > > > > > -- > behdad > http://behdad.org/ > > ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: Upright glyphs with combining marks in vertical text.
Care filing a bug please, so we don't lose? On Sun, Sep 10, 2017 at 4:24 AM, Behdad Esfahbodwrote: > Renders fine with hb-view, but broken with pango-view. > I'll take a look. > > On Thu, Sep 7, 2017 at 1:34 AM, Tavmjong Bah wrote: > >> On Wed, 2017-09-06 at 12:24 -0700, Behdad Esfahbod wrote: >> > Pictures please? >> >> Attached. >> >> > On Wed, Sep 6, 2017 at 12:07 PM, Tavmjong Bah >> > wrote: >> > > Hi, >> > > >> > > I've got two questions about rendering characters with combining >> > > marks >> > > (as one might have with CSS "writing-mode:vertical;text- >> > > orientation:upright"). >> > > >> > > It appears that Pango misplaces the marks as shown by: >> > > >> > > pango-view --annotate=2 --dpi=160 --gravity=east --gravity- >> > > hint=strong >> > > --rotate=-90 test-combining.txt >> > > >> > > where test-combining.txt has the following characters: >> > > >> > > G̃g̃X̃x̃ >> > > >> > > 1. Is this a bug? Or am I doing something wrong? >> > > >> > > 2. Shouldn't the width in PangoGlyphGeometry be the vertical height >> > > when typeset in upright vertical mode (with combining marks having >> > > a >> > > vertical height of zero)? >> > > >> > > Thanks, >> > > >> > > Tav >> > > > > -- > behdad > http://behdad.org/ > -- behdad http://behdad.org/ ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: Upright glyphs with combining marks in vertical text.
Renders fine with hb-view, but broken with pango-view. I'll take a look. On Thu, Sep 7, 2017 at 1:34 AM, Tavmjong Bahwrote: > On Wed, 2017-09-06 at 12:24 -0700, Behdad Esfahbod wrote: > > Pictures please? > > Attached. > > > On Wed, Sep 6, 2017 at 12:07 PM, Tavmjong Bah > > wrote: > > > Hi, > > > > > > I've got two questions about rendering characters with combining > > > marks > > > (as one might have with CSS "writing-mode:vertical;text- > > > orientation:upright"). > > > > > > It appears that Pango misplaces the marks as shown by: > > > > > > pango-view --annotate=2 --dpi=160 --gravity=east --gravity- > > > hint=strong > > > --rotate=-90 test-combining.txt > > > > > > where test-combining.txt has the following characters: > > > > > > G̃g̃X̃x̃ > > > > > > 1. Is this a bug? Or am I doing something wrong? > > > > > > 2. Shouldn't the width in PangoGlyphGeometry be the vertical height > > > when typeset in upright vertical mode (with combining marks having > > > a > > > vertical height of zero)? > > > > > > Thanks, > > > > > > Tav > -- behdad http://behdad.org/ ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: Upright glyphs with combining marks in vertical text.
On Wed, 2017-09-06 at 12:24 -0700, Behdad Esfahbod wrote: > Pictures please? Attached. > On Wed, Sep 6, 2017 at 12:07 PM, Tavmjong Bah> wrote: > > Hi, > > > > I've got two questions about rendering characters with combining > > marks > > (as one might have with CSS "writing-mode:vertical;text- > > orientation:upright"). > > > > It appears that Pango misplaces the marks as shown by: > > > > pango-view --annotate=2 --dpi=160 --gravity=east --gravity- > > hint=strong > > --rotate=-90 test-combining.txt > > > > where test-combining.txt has the following characters: > > > > G̃g̃X̃x̃ > > > > 1. Is this a bug? Or am I doing something wrong? > > > > 2. Shouldn't the width in PangoGlyphGeometry be the vertical height > > when typeset in upright vertical mode (with combining marks having > > a > > vertical height of zero)? > > > > Thanks, > > > > Tav ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: Upright glyphs with combining marks in vertical text.
Pictures please? On Wed, Sep 6, 2017 at 12:07 PM, Tavmjong Bahwrote: > > Hi, > > I've got two questions about rendering characters with combining marks > (as one might have with CSS "writing-mode:vertical;text- > orientation:upright"). > > It appears that Pango misplaces the marks as shown by: > > pango-view --annotate=2 --dpi=160 --gravity=east --gravity-hint=strong > --rotate=-90 test-combining.txt > > where test-combining.txt has the following characters: > > G̃g̃X̃x̃ > > 1. Is this a bug? Or am I doing something wrong? > > 2. Shouldn't the width in PangoGlyphGeometry be the vertical height > when typeset in upright vertical mode (with combining marks having a > vertical height of zero)? > > Thanks, > > Tav > > > ___ > gtk-i18n-list mailing list > gtk-i18n-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-i18n-list > -- behdad http://behdad.org/ ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Upright glyphs with combining marks in vertical text.
Hi, I've got two questions about rendering characters with combining marks (as one might have with CSS "writing-mode:vertical;text- orientation:upright"). It appears that Pango misplaces the marks as shown by: pango-view --annotate=2 --dpi=160 --gravity=east --gravity-hint=strong --rotate=-90 test-combining.txt where test-combining.txt has the following characters: G̃g̃X̃x̃ 1. Is this a bug? Or am I doing something wrong? 2. Shouldn't the width in PangoGlyphGeometry be the vertical height when typeset in upright vertical mode (with combining marks having a vertical height of zero)? Thanks, Tav ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Discretional alternate glyphs support
Hi all. I'm seeking for information about Pango support for discretional alternative glyphs substitution with OpenType fonts. Can I get from Pango the contents of OpenType tables rand, aalt, calt, falt, jalt, salt, ssXX for a given character? Can I force Pango to use one (or many) of the alternative glyphs while rendering a text, instead of the normal glyphs? If not, is planned to add these features? Perhaps I could lend a hand for implementing it. Thank you very much. -- David Marín Carreño dav...@gmail.com ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Descending glyphs overlap with ascending glyphs in next line
Hello all. I'm new developing a new application using Pango, with Cairo backend. I have discovered that, using default line spacing, descending glyphs in one line can overlap with ascending glyphs in the next line For example: Style Äm In this example, showing this text with pango-view, without setting any option, with de default serif font in my Ubuntu Linux, the 'y' in the first line overlaps with the 'Ä' in the second line. Is this the intended behaviour? Should the line-spacing be manually adjusted always? Or is this a bug? Please, cc me, as I am not subscribed to the list. Thanks a lot. -- David Marín Carreño dav...@gmail.com ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: How to extract rendered glyphs (graphemes?) with Pango?
OK, thanks very much for that. I've looked at those structures and I'm still not clear how to pull the combined, shaped and rendered glyphs out in bitmap form though. Those structures appear to hold geometry and other data, but not in rendered form. i.e. I actually need to programmatically cut up the rendered glyphs out of the rendered bitmap string. or alternatively pass the data for individual graphemes (glyphs? whatever the final product is of combining multiple unicode code points and then shaping them etc) to the renderer one at a time. I will say, this process does not have to be efficient at all as it won't be used in real time, just to render and then chop up (visually) the generated letters. So: a.) How do I get at the rendered letters (in visual order) ? b.) How do I separate out the diacritics also in rendered form (if at all possible) and know where to place them (in pixels) relative to the main character? c.) How do I uniquely identify each rendered letter so that I know if I encounter it a second time in the text I'm processing. I'm guessing I do a normal render of the text using pangocairo (e.g. as per examples I've found), then somehow chop the bitmap up (or copy from it) according to position data held in the structures somewhere - but not sure of specifics! Any specifics much appreciated :) Many thanks, Alex On 14/03/2011 20:56, Behdad Esfahbod wrote: On 03/14/11 15:38, Alex Kerr wrote: Also, I don't suppose it's possible to extract rendered diacritics is it, and positioning information for them relative to the base character they're attached to? Would be amazing if so :) That's essentially what PangoGlyphString does. Combined with the text itself, ie, PangoGlyphItem, it gives you full information about the clusters. Check PangoGlyphItemIter for example, which iterates clusters withing a PangoGlyphItem. From a PangoLayout you can get to the GlyphItems simply by getting the lines out of the layout and traversing line-runs which is a list of PangoLayoutRun's. PangoLayoutRun being a typedef to PangoGlyphItem. Cheers, behdad ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
How to extract rendered glyphs (graphemes?) with Pango?
Hi, Can anyone suggest a method for extracting the rendered glyph images in image form (i.e. after combining and shaping) for any script please? I need them in visual order, not logical order. i.e. what APIs to use, or even source code (/pseudocode). Context is any script, but especially complex scripts, e.g. Indic, Arabic etc. I need to be able to uniquely identify each rendered glyph (/grapheme) so I know whether it's already been rendered before in a document. Obviously each glyph could consist of several unicode code points, so not sure that's the best way to track them if there's another a unique identifier for the rendered grapheme. Also, I don't suppose it's possible to extract rendered diacritics is it, and positioning information for them relative to the base character they're attached to? Would be amazing if so :) Many thanks, Alex ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Glyphs Issue with Pango Fonts
Hi all, I am a research engineer at Software for Education Entertainment and Training Activities(SEETA). As a part of a project, I was working on an activity in OLPC's desktop environment Sugar. The activity i was working on is a word translator, and pango fonts are used for creating the User Interface and henceworth, used for the output . The problem i am facing is several glyphs are missing when used in languages such as spanish/italian. For example, Italian translation of mast is alebro but instead the application shows [box with cross]lbero. Similarly, several more characters such as 'é' are not interpreted correctly. If a way can be suggested such that the issue is resolved using pango fonts or a suitable alternative, it'll be really helpful. Looking forward to your feedback. Regards, Sarvagya Mukhi Research Engineer, Software for Education Entertainment and Training Activities http://seeta.in ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: Glyphs Issue with Pango Fonts
On 10/26/10 10:55, Sarvagya Mukhi wrote: Hi all, I am a research engineer at Software for Education Entertainment and Training Activities(SEETA). As a part of a project, I was working on an activity in OLPC's desktop environment Sugar. The activity i was working on is a word translator, and pango fonts are used for creating the User Interface and henceworth, used for the output . The problem i am facing is several glyphs are missing when used in languages such as spanish/italian. For example, Italian translation of mast is alebro but instead the application shows [box with cross]lbero. Similarly, several more characters such as 'é' are not interpreted correctly. The [box with cross] means that the text passed to pango is not valid UTF-8. You probably are dealing with text in the Latin1 encoding whereas Pango expects UTF-8. Just make sure everything is in UTF-8. behdad If a way can be suggested such that the issue is resolved using pango fonts or a suitable alternative, it'll be really helpful. Looking forward to your feedback. Regards, Sarvagya Mukhi Research Engineer, Software for Education Entertainment and Training Activities http://seeta.in ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
some questions about runs, glyphs, chars, bytes, clusters
Hi, I am making some tests to try and learn more about Pango. Right now I am trying to step through a layout line by line, run by run, and then word by word. I was hoping someone might be able to help me out with some questions. Here is what I am doing. static char * text = { flower power }; // I get the layout PangoLayout *layout; layout = pango_layout_new(pango_context); pango_layout_set_text(layout, text, -1); pango_layout_context_changed(layout); // I then get iterators for lines and stuff PangoLayoutIter* p_iter = 0; p_iter = pango_layout_get_iter(layout); PangoLayoutLine* p_line = pango_layout_iter_get_line(p_iter); GSList* current_run = p_line-runs; PangoLayoutRun* p_run=(PangoLayoutRun*)current_run-data; // I then try to get attribute info for this run PangoLogAttr * logattrs = (PangoLogAttr *) malloc( (p_run-item-num_chars +1 ) * sizeof(PangoLogAttr) ); pango_break(text+ p_run-item-offset, p_run-item-length, p_run-item-analysis, logattrs, p_run-item-num_chars+1); // Am I doing this wrong? // This then gives me a PangoLogAttr for every byte char in the text // string, correct? But, since there could be more than one char for // a glyph, where do I check for word_end? // Can someone tell me here what num_chars refers to in the item? // is that character bytes? // is that not always the same as item-length? // Also, what is the difference between a byte, a character, a glyph, // and a cluster in Pango? In the docs and naming of variables, is // it consistently named? // Then, I try to step through the run by glyph and logattr to see // where words start and end // Is this correct? for(int i=0;ip_run-glyphs-num_glyphs;i++) { j=p_run-glyphs-log_clusters[i]; // I print out some info about the word start and end printf(\t\tword_start:%d, , logattrs[j].is_word_start); printf(word_end:%d \n, logattrs[j].is_word_end); } The funny thing that I notice heres is that the f and the l in flower is considered one glyph. Is that right? Sorry if my questions are basic. I can see how complex type layout is now that I am getting my hands dirty. Any help would be greatly appreciated. thank you -august. ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
glyphs
Hi, I'm a newbie to pango low-level functions and am trying to learn how to use pango_itemize, pango_break, and pango_shape properly. Given an item from pango_itemize, I do: PangoGlyphString *glyphs = pango_glyph_string_new(); pango_glyph_string_set_size(glyphs, item-num_chars); pango_shape(text+item-offset, item-length, item-analysis, glyphs); printf(number of glyphs: %d \n, glyphs-num_glyphs); for (int j=1;j glyphs-num_glyphs ;j++){ // crashes here printf(#%d, guint32 glyph=%d\n, j, glyphs[j].glyphs-glyph ); } What am I doing wrong? thanks -august. ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: glyphs
Hi, I'm a newbie to pango low-level functions and am trying to learn how to use pango_itemize, pango_break, and pango_shape properly. Given an item from pango_itemize, I do: PangoGlyphString *glyphs = pango_glyph_string_new(); pango_glyph_string_set_size(glyphs, item-num_chars); pango_shape(text+item-offset, item-length, item-analysis, glyphs); printf(number of glyphs: %d \n, glyphs-num_glyphs); for (int j=1;j glyphs-num_glyphs ;j++){ // crashes here printf(#%d, guint32 glyph=%d\n, j, glyphs[j].glyphs-glyph ); } What am I doing wrong? it figures that I have been staring at this for a few hours already and notice my mistake right after I send for help to the list. It should be: printf(#%d, guint32 glyph=%d\n, j, glyphs-glyphs[j].glyph ); sorry for the noise. But, if anyone has a link to some readable example code using pango_itemize, pango_break, and pango_shape, I'd really appreciate it. I cannot find anything online. -august. ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: [gtk-i18n-list] Re: Glyphs in vertical text are drawn on top of each other
Excuse me, could you inform the font file and libraries that you got success? Now I don't have time to reproduce the issue, but I'm interested in. Hi, the code worked fine with this font: http://sourceforge.jp/projects/efont/downloads/10087/sazanami-20040629.tar.bz2 I just copied the TTF files in /usr/X11/lib/X11/fonts (IIRC) and the font was automatically used by default - you may have to specify this font if it does not get automatically selected for you. Thanks ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Re: [gtk-i18n-list] Re: Glyphs in vertical text are drawn on top of each other
On Thu, 16 Oct 2008 13:19:41 -0400 Behdad Esfahbod [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I have seen some reports about such problems, with glyphs partially overlapping, not completely superimposed. Is that what you are seeing? A screenshot helps. In the past, it always looked like a font problem and Here's both a trimmed down test case that shows the problem, and a screenshot of its output. Maybe you can spot if I'm doing something wrong here. The code works just fine here. Excuse me, could you inform the font file and libraries that you got success? Now I don't have time to reproduce the issue, but I'm interested in. Regards, mpsuzuki ___ gtk-i18n-list mailing list gtk-i18n-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-i18n-list