Re: regarding all the possible functions that can be assigned to PangoCairoShapeRendererFunc func



Thanks John.

The ShapeRenderer function draws whatever you like on the supplied cairo context. See pango_attr_shape_new() [1].
 
I don't think that it makes sense to implement it anywhere except PangoCairo: That's the *destination*; the others (including ft2) are font sources, meaning that they provide the glyph metrics that Pango uses to layout lines of text and to render them onto a cairo surface for display. Is that what you mean by "elaborate on the bigger picture"?
 
Yes, that is exactly what I meant by "the bigger picture". So, now, we agree that the ShapeRenderer function displays the attributes supplied in the cairo context.
 
Now, I need a similar ShapeRenderer function that displays the attributes supplied while using pangoft2.

To further clarify my problem-statement, let me add the following:
When we compare the pangoft2-render.c's and pangocairo-render.c's renderer_class_init functions, we observer that pangoft2-render.c initializes only 2 functions whereas pangocairo-render.c initializes 6 functions ( including renderer_class->draw_shape = pango_cairo_renderer_draw_shape )
 
Now, here's my assertion. (correct me, if I am wrong)
I think that it is the presence of these initialized functions that enables pangocairo to render different styles(italic/oblique), variants, weights(thin, normal, ultraheavy), stretch etc. and other attributes, which are impossible to render in pangoft2.

If I am correct, then you can understand why I want to implement the ShapeRenderer function.

If I am wrong, then lets forget this whole discussion, and let me put up a simple question:
How can I render different styles(italic/oblique), variants, weights(thin, normal, ultraheavy), stretch etc. and other attributes while using pangoft2 ?

I hope that I was able to explain my question in a better manner this time. Thanks again. :)
 
--
PangoLearner


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