[cairo] Need a Font Primer

Travis Griggs tgriggs at key.net
Mon Aug 21 14:03:21 PDT 2006


I'm sitting here looking at the fonts stuff, reading docs, feeling  
overwhelmed. I have a number of questions which I'm hoping you guys  
can help me with.

1) For most of my uses, the cairo_select_font_face() and  
cairo_set_font_size() are probably functionally good enough. I'm  
confused on what the Cairo "Toy" font reference is. Does this mean  
these APIs are just for toy usage, or does it do something different  
than if it used other APIs. There is a type that is a TOY, so I'm  
assuming it does something different than if I'd use the more  
"involved" APIs. What are the ramifications of that?

2) I have some cases, where I want to select fonts for different  
encodings. To display mixed language texts. For that, I'm going to  
have to get comfy with FcPattern and pattern it looks like. Can  
anyone point me to some sample code/tutorial/whatever that would  
jumpstart figuring out what a common pattern is for doing this stuff.

3) Scaled Fonts - Am I correct in discerning that to select a  
scalable font under X, I'd have to first create the font using  
cairo_ft_font_create_for_pattern() and then pass that to  
cairo_scaled_font_create()? Maybe it's the case that a cairo scaled  
font, is not the same thing as an X11 scalable font and that's what's  
causing me the confusion.

4) font_options_substitute - Is the common pattern basically to  
create a set of font options at application startup time, and then  
call this function each time you create a font?

TIA

--
Travis Griggs
Objologist
10 2 letter words: "If it is to be, it is up to me"





-----------------------------------------
DISCLAIMER: This email is bound by the terms and conditions
described at
http://www.key.net/disclaimer.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20060821/7f0cb260/attachment.htm


More information about the cairo mailing list