Hi Konstantin, I think that unless you use the text to place it in a exact
position as part of the scene, you won't notice so much the differences
between Software and Cairo Pango as I have mostly emulated the basic
parameters.
Also, Pango does a hinting to place the letters in the right pixel to avoid
as possible as less antialiasing so the render result is much clear
specially for small fonts.

So unless something I forgot, I've finished (apart of the blend method that
is pending for all layers) the Text layer with the latest commit.

Differences:
1) Text position is displaced vertically the difference between the logical
and the ink rectangles in its upper part. It is not significative for most
of the cases.
2) Letter and lines spacing are hardcoded based on a formula with the
current vertical and horizontal spacing. When they are 1.0 the Pango
spacing is 0.0 and so on.
3) In general, Synfig renders like if the weight were Light and not Normal
so when you compare fonts please select Light in the Weight parameter. It
won't affect Synfig's render but will match properly Pango render.
4) Vertical and horizontal size are hardcoded scaled by 1.75 from the value
Pango offers. It is to match as much as possible the size of the Synfig's
renderer.
5) When scale vertical and horizontal are not the same, the base Font size
is the horizontal size and to the vertical is applied a scale of
sizey/sizex.
Orientation works fine in vertical. In horizontal it applies the following
rule:
orientation.x < 0.4 -> PANGO_ALING_LEFT
orientation.x > 0.6 -> PANGO_ALING_RIGHT
PANGO_ALIGN_CENTER otherwise.

Please feedback on the decision made.

Cheers!


2012/8/31 Konstantin Dmitriev <ksee.zelga...@gmail.com>

> Hi!
> Sorry for the late answer.
> I'm using Text Tool in almost every synfig project - for captions or
> credits. I also use various parameters like linespacing, character
> spacing, custom fonts. But I 100% agree with your decision to
> sacrifice compatibility in favour to the simplicity. Especially
> considering that with pango the text will look a bit different anyway.
> ^__^
> Thank you!
> K.
>
> 2012/8/31 Carlos López González <genet...@gmail.com>:
> > Hi there!
> > thank you all for the quick feedback on this matter!!. Considering that I
> > agree with all your comments I'll do this:
> >
> > "Implement Text layer using Pango-Cairo libraries with the minimum
> effort to
> > maximize the emulation of the basic parameters."
> >
> > Also, it is worth to mention that once the Glyphs are stored in a Cairo
> > format (convert the pango glyphs to a cairo path is not that difficult)
> It
> > might be possible to render the cairo path on a Synfig's surface with a
> > little of effort in coding. It could be possible because the Cairo path
> > provides a way to read its primitives, and so, it is possible to turn
> them
> > into something that Synfig's current shape renderer can understand. That
> way
> > a Pango text layer could be implemented even in a native Synfig surface.
> >
> > But that's other story... ^__^
> >
> >
> > Cheers!
> >
> > --
> > Carlos
> > http://synfig.org
> >
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > Synfig-devl mailing list
> > Synfig-devl@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/synfig-devl
> >
>
>
>
> --
> http://morevnaproject.org/
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Synfig-devl mailing list
> Synfig-devl@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synfig-devl
>



-- 
Carlos
http://synfig.org
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to