[cairo-bugs] [Bug 5495] Need cairo_scaled_font_text_extents

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jan 7 07:13:57 PST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5495          
     




------- Additional Comments From freedesktop at behdad.org  2006-01-08 02:09 -------
Thanks Carl for the detailed reply.

I have mixed feelings about adding cairo_text_glyphs.  On one hand, I see it
useful for doing text on a path too, on the other hand, I like to see the toy
API as limited as possible, for reasons that we both know, but most users of
cairo don't know: that the toy API is not going to do i18n text anything near
what Pango does anytime, unless you duplicate/copy Pango into cairo.  So the
more limited it is, the more people will use Pango or another real text
rendering engine, and that makes their applications much more useful to the world.

Back to my need, when cairo_scaled_font_t getters are committed, I have a
solution using a dummy cairo_t.  I create a 0x0 image surface, that should work
good enough.  So, yes, anything needing a cairo_t is not going to help me more
here.  I personally am not satisfied with the that way, so I'm calling that ugly
and prefer adding cairo_scaled_font_text_extents, but if you really think it's
going to make new problems later, I'm not insisting on it.

I'm with you in implementing cairo_scaled_font_text_extents to fix this bug. 
Lets postpone exposing text_glyphs to when we exactly know where the toy api is
going.

I prefer:

cairo_public void
cairo_scaled_font_text_extents (cairo_scaled_font_t   *scaled_font,
				const char            *utf8, 
				cairo_text_extents_t  *extents);

Like cairo_scaled_font_glyph_extents, and I'd say it should use (0,0) as (x,y),
but that's your decision.

behdad          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list