yes I want beautiful fonts in Pharo :)
Le 4/11/15 18:14, Tudor Girba a écrit :
This is one beautiful piece of work!
Doru
On Wed, Nov 4, 2015 at 3:51 PM, Aliaksei Syrel <[email protected]
<mailto:[email protected]>> wrote:
Ok, answer is quite simple.
Current string rendering on athens does not support kerning.
Because it is not cairo's job. Kerning should be took into account
_after_ creating glyphs with cairo but _before_ extent measurement
and obviously rendering. It can be done with FreeType.
I made small refactoring of text measurement and added kerning
support.
So, *in the latest version of Athens-Cairo* you can get extents
easily:
extents := CairoFontMetricsProvider new
font: StandardFonts defaultFont;
extentsOf: 'Ta ffl'.
extent is an instance of CairoTextExtents.
Rendering on athens with Times New Roman size 200 gives: (Mac OSX
Yosemite)
Inline image 1
And here is what I get in Keynote with the same font
Inline image 2
Close enough :D
Cheers,
Alex
On Wed, Nov 4, 2015 at 2:04 PM, Aliaksei Syrel
<[email protected] <mailto:[email protected]>> wrote:
However, Helvetica Neue on mac has kerning.
Will check
Cheers,
Alex
On Wed, Nov 4, 2015 at 1:59 PM, Aliaksei Syrel
<[email protected] <mailto:[email protected]>> wrote:
StandardFonts defaultFont
"a LogicalFont
familyName: Source Sans Pro
emphasis: nil
pointSize: 10
realFont: FreeTypeFont('Source Sans Pro' 'Regular' 10)
weight: 400 stretch: 5 slant: 0"
StandardFonts defaultFont realFont
"FreeTypeFont('Source Sans Pro' 'Regular' 10)"
StandardFonts defaultFont realFont face hasKerning
"false"
Free type source sans pro in Pharo just _does not_ support
kerning.
--
www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"