Hi, On 7 Jun 2012, at 15:57, Igor Stasenko wrote:
ouch.. looks like extension methods is wiped from LogicalFont.. i will add them back..
Thanks.
But in overall , i want to tell you the situation: as you may see, there is no high-level API defined yet in Canvas/Surface for text rendering. And i am going to introduce it , once i'll deal with VM bundling.. because telling people to install cairo and do jumps and hops just to see it works is wasting a time.
Great.
Now the idea how i want to introduce it is simple. You can use any object as font (as long at it should conform to some minimal font protocol, which has to be defined). I don't like to inherit AbstractFont protocol, because it is too pixel-wise centric.
Sounds good.
Now, to start using that font on a surface, once should tell font:
renderer := font getRendererOn: surface.
this should answer a subclass of GlyphRenderer, which then can be used later to render the text on given surface using given font.
renderer setPosition: .. renderer renderGlyphsIn: 'abcde' from: 1 to: ('abcde' size) etc.
of course there is missing some convenience protocol(s), but just to give you an idea.
About pango: pango is framework for text layout, not rendering. So, it can be used along with Athens, but it will be never an integral part of Athens. In Athens, i don't want to provide a high-level and highly complex semantics for text layout, because it is a separate domain and you can spend whole life there. Athens should support only basic drawing operations, like draw character span at certain position.
Exactly. This is what we need for engines like EyeSee and Roassal.
The rest (layout) should be handled externally.
I know that. I should have not mentioned Pango :) Cheers, Doru -- www.tudorgirba.com "Sometimes the best solution is not the best solution."