Re: [ft-devel] ttfautohint: How to install

2011-07-07 Thread Werner LEMBERG

> My patch file looks like this (taken from your post) -
> 
> 
> diff --git a/src/tafpgm.c b/src/tafpgm.c
> index 1268e29..3874844 100644
> --- a/src/tafpgm.c
> +++ b/src/tafpgm.c
> @@ -4298,6 +4298,11 @@ unsigned char FPGM(bci_hint_glyph) [] = {
> 
>   ENDF,
> 
> +  PUSHB_1,
> +100,
> +  FDEF,
> +  ENDF,
> +
> };

Yep, thanks.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-07 Thread vernon adams
Hi, sorry i forgot about that.
Patch wouldn't apply 
i get -


patching file tafpgm.c
patch:  malformed patch at line 14: };




My patch file looks like this (taken from your post) -


diff --git a/src/tafpgm.c b/src/tafpgm.c
index 1268e29..3874844 100644
--- a/src/tafpgm.c
+++ b/src/tafpgm.c
@@ -4298,6 +4298,11 @@ unsigned char FPGM(bci_hint_glyph) [] = {

  ENDF,

+  PUSHB_1,
+100,
+  FDEF,
+  ENDF,
+
};




-vern



On 7 Jul 2011, at 12:51, Werner LEMBERG wrote:

> 
>>> Attached is a patch for tafpgm.c; please apply temporarily to make
>>> the `fpgm' table four bytes longer.
>> 
>> Thanks for that.
> 
> Have you been able to test that?  Are fonts generated with the
> slightly larger `fpgm' table rendered correctly, or do you still get
> an egg-shaped `O' glyph?
> 
> Otherwise, I'm going to contact Greg Hitchcock from Microsoft, asking
> for help.  Perhaps he can explain what's going on.
> 
> 
>Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-07 Thread Werner LEMBERG

>> Attached is a patch for tafpgm.c; please apply temporarily to make
>> the `fpgm' table four bytes longer.
>
> Thanks for that.

Have you been able to test that?  Are fonts generated with the
slightly larger `fpgm' table rendered correctly, or do you still get
an egg-shaped `O' glyph?

Otherwise, I'm going to contact Greg Hitchcock from Microsoft, asking
for help.  Perhaps he can explain what's going on.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-02 Thread Werner LEMBERG

> What i have noticed with ttfautohint is that often e.g. a regular
> weight of a font will grow in size at a bigger % than the bold
> weight.  So i'm thinking the Regular is 'over-hinted', maybe.

Well, ttfautohint has no possibility to decide whether a font is bold
or not...  The Infinality patches, however, try to cater with such a
situation, giving different thresholds for bold shapes.  I haven't
checked yet whether this harmonizes (in your sense) the appearance of
regular and bold weights.  If this works as expected I could add an
option to ttfautohint to make it treat the font to be processed as
bold.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-01 Thread vernon adams

On 1 Jul 2011, at 15:37, Werner LEMBERG wrote:

>> 
>> Also, how easy might it be to implement an Option that
>> auto-instructs only the Y-axis?
> 
> There's hinting along the y-axis *only*!

Ah!  Good job then ;)

> 
>> One thing i'm noticing is that font file sizes almost double as a
>> result of ttfautohint (10-20% more than manual hinting) [...]
> 
> Yes.  I think this is unavoidable to a large extent given how the
> autohinter works: It doesn't treat single points but segments and
> edges, and this additional indirection is responsible for the rather
> large size.  I have at least one idea how I could slightly reduce the
> amount of data, but it will always be larger than manual hinting.


Sure, it's not sooo much bigger than full on manual hinting, but anything to 
trim it down is a bonus.
What i have noticed with ttfautohint is that often e.g. a regular weight of a 
font will grow in size at a bigger % than the bold weight. So i'm thinking the 
Regular is 'over-hinted', maybe. I should look at that closer.

many thanks

Vernon
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-01 Thread Werner LEMBERG

> Also, how easy might it be to implement an Option that
> auto-instructs only the Y-axis?

There's hinting along the y-axis *only*!

> One thing i'm noticing is that font file sizes almost double as a
> result of ttfautohint (10-20% more than manual hinting) [...]

Yes.  I think this is unavoidable to a large extent given how the
autohinter works: It doesn't treat single points but segments and
edges, and this additional indirection is responsible for the rather
large size.  I have at least one idea how I could slightly reduce the
amount of data, but it will always be larger than manual hinting.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-07-01 Thread vernon adams
Thanks for that.

Also, how easy might it be to implement an Option that auto-instructs only the 
Y-axis ? One thing i'm noticing is that font file sizes almost double as a 
result of ttfautohint (10-20% more than manual hinting) and I'm wondering if 
much of the x-axis stuff might be not-so-essential for adequate hinting. Just a 
thought.

-vern


On 30 Jun 2011, at 14:05, Werner LEMBERG wrote:

> Attached is a patch for tafpgm.c; please apply temporarily to make the
> `fpgm' table four bytes longer.
> 
> 
>Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-30 Thread Werner LEMBERG

> FYI i had noticed a possible issue with the sizing in relation to
> the 'fpgm' on all tffautohint generated fonts. When i check them in
> 'OTMaster', the 'maxSizeOfInstructions' is flagged up by OTMaster as
> in need of fixing, e.g. the ttfautohint version of Ubuntu Font gives
> a size of 1013; that OTMaster autocorrects to 2636 to match the
> fpgm.

Interesting.  The specification just says

  maxSizeOfInstructions   Maximum byte count for glyph instructions.

And ttx, for example, doesn't take the size of the `fpgm' table into
account either.  Anyways, I've changed the code accordingly in the git
repository so that OTMaster doesn't complain :-)

> I tested the dummy font. It actually didn't render at all under
> DirectWrite (FFox5) !?, but did under GDI, see shot below;

Uh, oh, then let's forget that, please :-) Apparently, I've done a
mistake somewhere while reducing the font to a single glyph with less
SFNT tables.

Attached is a patch for tafpgm.c; please apply temporarily to make the
`fpgm' table four bytes longer.


Werner


==


diff --git a/src/tafpgm.c b/src/tafpgm.c
index 1268e29..3874844 100644
--- a/src/tafpgm.c
+++ b/src/tafpgm.c
@@ -4298,6 +4298,11 @@ unsigned char FPGM(bci_hint_glyph) [] = {
 
   ENDF,
 
+  PUSHB_1,
+100,
+  FDEF,
+  ENDF,
+
 };
 
 

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-30 Thread Werner LEMBERG

> The 'final image' is simply the ttfautohint instructions with the
> addition of links (double links work best in this instance). I did
> no extra hinting from fontlab - [...]
>
> [...] if i look at the same font in FontForge's Gridfitmode, then i
> don't see the egging issue at all.

Exactly!  Such a big deviation between the rendering results indicates
a severe problem IMHO.

The only possible explanation I have so far is that the MS Windows
rasterizer never sees the IUP[y].  It's the last instruction in the
`fpgm' table, only followed by a final ENDF.  Maybe I've somehow
incorrectly implemented the generation of this SFNT table, but ttx
doesn't show any error, and a round-conversion gives the same size and
checksum of the `fpgm' table...

Just to be sure that an incorrect `fpgm' size isn't the problem I ask
you to try the attached font.  With FontForge, I've stripped off all
glyphs but uppercase `O', then I've disassembled it with ttx, omitting
the `FFTM', `GDEF', `GPOS', and `GSUB' tables, then added a dummy
function at the end of the `fpgm' table to make it bigger, and finally
assembled it again with ttx.


Werner


Ubuntu-R-TA-only-O.ttf
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-30 Thread vernon adams
The 'final image' is simply the ttfautohint instructions with the addition of 
links (double links work best in this instance). I did no extra hinting from 
fontlab - what you see afaik is pixel fitting from the ttfautohint 
instructions, plus the effect of the additional links.  Sadly Fontlab has no 
function to see or manipulate the actual TT instructions, so i can't see what 
how the actual instructions differ when i add the links.

I think it's interesting that if i look at the same font in FontForge's 
Gridfitmode, then i don't see the egging issue at all. Is it possible that 
Fontlab's TT rendering is much more like the microsoft engines? It definitely 
looks like the rendering in the screenshots i took from Windows7.

Is any of this helping ?  :)  I'm temped to look at the font in MS 
VisualTruetype and look at the raw instructions when i add links.


-vern



On 30 Jun 2011, at 09:27, Werner LEMBERG wrote:

> 
>> (above) Upper case 'O', ttfautohint version, opened in Fontlab
>> 'Truetype hinting' mode, showing alignment zones & pixels arranged
>> by ttfautohints instructions. 27 ppem.  Note the egging at top
>> curve, as snapping is to pixel at TOP of alignment zone.
> 
> Thanks.  Is your image the final result of the hinting process with
> FontLab?  I get a similar result (i.e., the egged shape) only before
> applying the last instruction of the glyph, IUP[y] (in function 47)...
> 
> 
>Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-30 Thread Werner LEMBERG

> (above) Upper case 'O', ttfautohint version, opened in Fontlab
> 'Truetype hinting' mode, showing alignment zones & pixels arranged
> by ttfautohints instructions. 27 ppem.  Note the egging at top
> curve, as snapping is to pixel at TOP of alignment zone.

Thanks.  Is your image the final result of the hinting process with
FontLab?  I get a similar result (i.e., the egged shape) only before
applying the last instruction of the glyph, IUP[y] (in function 47)...


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-29 Thread Werner LEMBERG

>> If you limit hinting-range-max to a value where the blue zones are
>> still handled, the generated bytecode uses this hinting set for all
>> larger sizes also.  Finding a good value for hinting-range-max has
>> to be done with trial and error, but a waterfall already indicates
>> bad sizes, so hinting-range-max must be less than that).
> 
> hmm i have tested varying min-range & max-range - by shifting ranges
> i can get the 'egging issue' to move up/down a ppem size, so the
> issue persists but just at different ppem's.

OK.

> It seems to me that the egging issue is caused by the top curves of
> the 'o' snapping to the top edge of the pixel that corresponds to
> that alignment zone, if i force these curves to snap to the bottom
> edge of the alignment zone pixel then the egging is fixed!  Of
> course then i need all pixels in the alignment zone to snap to the
> bottom of the pixel to get uniform x-height throughout all glyphs.
> 
> Could there be a way to force pixel snapping to the bottom of pixel
> in some alignment zones like this with ttfautohint?

While I basically understand what you write, I have some difficulties
to imagine it visually.  Could you provide FontLab snapshots of an
`egged o', together with your proposed fix?


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-29 Thread vernon adams

On 25 Jun 2011, at 06:56, Werner LEMBERG wrote:

> Please try the current git snapshot and play with the options
> --hinting-range-min and --hinting-range-max.
> 
> Currently, the default value for hinting-range-max is 1000; this means
> that the autohinter tests all ppem values up to 1000 to find hinting
> sets.  However, the larger the ppem, the larger the blue zones.  And
> by design, the autohinter ignores blue zones which are larger than 3/4
> pixels.
> 
> If you limit hinting-range-max to a value where the blue zones are
> still handled, the generated bytecode uses this hinting set for all
> larger sizes also.  Finding a good value for hinting-range-max has to
> be done with trial and error, but a waterfall already indicates bad
> sizes, so hinting-range-max must be less than that).

hmm i have tested varying min-range & max-range -  by shifting ranges i can get 
the 'egging issue' to move up/down a ppem size, so the issue persists but just 
at  different ppem's.

> 
> The adverse effects of having a very small value for hinting-range-max
> must be analyzed also; it essentially means that some horizontal
> segments which at larger ppem values no longer align are still treated
> as edges.  Maybe it helps if I introduce options to manipulate the
> `gasp' table, making it possible to set an upper limit for applying
> hints.
> 

>From my experience i doubt that the gasp table will hold any magic bullets, 
>especially under DirectWrite.


> Finally, I don't know yet whether it makes sense to directly
> manipulate the 3/4 pixels limit (perhaps by deactivating this
> threshold completely).  This needs further testing.

Worth a try.


I have opened up a ttfautohint version of Ubuntu Font in FontLab, where i can 
use a 'gridfit' mode (just as in FontForge) but i can also add Visual TrueType 
commands and see the resulting effect on the pixels. So i tested the 'o' glyph.

It seems to me that the egging issue is caused by the top curves of the 'o' 
snapping to the top edge of the pixel that corresponds to that alignment zone, 
if i force these curves to snap to the bottom edge of the alignment zone pixel 
then the egging is fixed!  Of course then i need all pixels in the alignment 
zone to snap to the bottom of the pixel to get uniform x-height throughout all 
glyphs.

Could there be a way to force pixel snapping to the bottom of pixel in some 
alignment zones like this with ttfautohint?

many thanks

-vernon



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-25 Thread Werner LEMBERG

> I am curious - as i understand it(?) ttfautohint uses freetype to
> find snap zones etc from which it bases it's TT instructions output.

I've copied a large part of the autofit module into ttfautohint;
additionally, I'm calling some FreeType routines for generic reading
and parsing of the input font.

> So what mileage could there be in using a patched freetype tree with
> ttfautohint?

ttfautohint doesn't use a modified FreeType library.  However, the
copied autofit stuff has been slightly modified since I have to access
various data structures which aren't publicly exposed normally.

> I'm thinking of some of Infinality patches that have attempted to
> tweak Freetype's hinting routines.  Some i think were attempting to
> give more aggressive, cleartype-like rendering.

The stuff from Erik regarding the autohinter is exactly this.
However, I have yet to test whether I can `translate' it easily into
bytecode instructions.


   Werner


PS: BTW, I've delayed integration of Erik's patches until this release
is out.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-25 Thread vernon adams

> 
> Thanks again for your invaluable help in testing ttfautohint!
> 
My pleasure. Very keen to see a working autohinter available to font
designers :) 

> >
> > The feedback i'm getting from my screenshots is that the ttfautohint
> > output is overall superior under DirectWrite to the original hinted
> > fonts.  Just seems to be a little extra 'something' needed to get
> > the GDI sorted too :)
> 
> Please try the current git snapshot and play with the options
> --hinting-range-min and --hinting-range-max.
> 
> Currently, the default value for hinting-range-max is 1000; this means
> that the autohinter tests all ppem values up to 1000 to find hinting
> sets.  However, the larger the ppem, the larger the blue zones.  And
> by design, the autohinter ignores blue zones which are larger than 3/4
> pixels.
> 
> If you limit hinting-range-max to a value where the blue zones are
> still handled, the generated bytecode uses this hinting set for all
> larger sizes also.  Finding a good value for hinting-range-max has to
> be done with trial and error, but a waterfall already indicates bad
> sizes, so hinting-range-max must be less than that).

Yep. I will test these ranges & make available any relevant screenshots.

> 
> The adverse effects of having a very small value for hinting-range-max
> must be analyzed also; it essentially means that some horizontal
> segments which at larger ppem values no longer align are still treated
> as edges.  Maybe it helps if I introduce options to manipulate the
> `gasp' table, making it possible to set an upper limit for applying
> hints.
> 
> Finally, I don't know yet whether it makes sense to directly
> manipulate the 3/4 pixels limit (perhaps by deactivating this
> threshold completely).  This needs further testing.
> 

I am curious - as i understand it(?) ttfautohint uses freetype to find
snap zones etc from which it bases it's TT instructions output. So what
mileage could there be in using a patched freetype tree with
ttfautohint? I'm thinking of some of Infinality patches that have
attempted to tweak Freetype's hinting routines. Some i think were
attempting to give more aggressive, cleartype-like rendering. Is there
anything to learn from those patches when tweaking ttfautohint?


many thanks

-vern


> 
> Werner



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-24 Thread Werner LEMBERG

> Just posted screenshots of ttfautohint output under DirectWrite
> (Cleartype & Grayscaling).

Thanks again for your invaluable help in testing ttfautohint!

> Interesting. imo, generally the ttfautohint output is superior to
> the original fonts' output, though there are some glitches, e.g. dot
> accents are malformed.

In general, composite glyphs will be inferior with ttfautohint; this
is unavoidable.  It will take some time until I've implemented an
option to pre-hint all glyphs (and thus resolving the composites) to
improve that at the cost of larger output files.

> Do you think it's possible that the autohinter can be tweaked to
> lessen the effects of the aggressive vertical filtering of GDI?  or
> is it already at the limits of what's possible for GDI?
>
> The feedback i'm getting from my screenshots is that the ttfautohint
> output is overall superior under DirectWrite to the original hinted
> fonts.  Just seems to be a little extra 'something' needed to get
> the GDI sorted too :)

Please try the current git snapshot and play with the options
--hinting-range-min and --hinting-range-max.

Currently, the default value for hinting-range-max is 1000; this means
that the autohinter tests all ppem values up to 1000 to find hinting
sets.  However, the larger the ppem, the larger the blue zones.  And
by design, the autohinter ignores blue zones which are larger than 3/4
pixels.

If you limit hinting-range-max to a value where the blue zones are
still handled, the generated bytecode uses this hinting set for all
larger sizes also.  Finding a good value for hinting-range-max has to
be done with trial and error, but a waterfall already indicates bad
sizes, so hinting-range-max must be less than that).

The adverse effects of having a very small value for hinting-range-max
must be analyzed also; it essentially means that some horizontal
segments which at larger ppem values no longer align are still treated
as edges.  Maybe it helps if I introduce options to manipulate the
`gasp' table, making it possible to set an upper limit for applying
hints.

Finally, I don't know yet whether it makes sense to directly
manipulate the 3/4 pixels limit (perhaps by deactivating this
threshold completely).  This needs further testing.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-24 Thread vernon adams
Hi Werner,

Do you think it's possible that the autohinter can be tweaked to lessen the 
effects of the aggressive vertical filtering of GDI?
or is it already at the limits of what's possible for GDI?

The feedback i'm getting from my screenshots is that the ttfautohint output is 
overall superior under DirectWrite to the original hinted fonts.  Just seems to 
be a little extra 'something' needed to get the GDI sorted too :)

many thanks

-vern






On 21 Jun 2011, at 14:33, Werner LEMBERG wrote:

>> 
>> there's still some 'curve flattening' at large sizes, but less
>> marked now.  I will post some full waterfall tests later today to
>> check all point sizes up to 48 ish.
> 
> The reason for the difference is an incredibly aggressive vertical
> filtering with GDI, I believe.  Have a look at the attached images to
> compare how ftview and Win98's GDI render glyph `o' from the
> ttfautohint version of the Ubuntu font:
> 
>  Ubuntu-R-TA-o-48px-1.0gamma-ftview.png
>  Ubuntu-R-TA-o-48px-Win98-GDI-Chrome12.png
> 
> GDI apparently paints horizontally isolated pale pixels as white, and
> blackens isolated dark pixels.  I consider this plain ugly.  At 48px,
> the glyphs in the top waterfall (Win98 GDI rendering) on the above web
> page look as if they had been rendered without anti-aliasing...
> 
> The FontForge snapshots demonstrate how the hinted outlines differ
> between the original hinting in Ubuntu (Ubuntu-R) and the ttfautohint
> version (Ubuntu-R-TA):
> 
>  Ubuntu-R-TA-o-48px.png
>  Ubuntu-R-o-48px.png 
> 
> As you can see, the ttfautohint intentionally aligns the hinted
> outline (green) at half-pixel borders, making it almost the same shape
> as the unhinted outline (black).  On the other hand, the original
> Ubuntu hinting is far more aggressive even at that large size,
> rounding to integer pixel values.


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-23 Thread vernon adams
http://code.newtypography.co.uk/

Just posted screenshots of ttfautohint output under DirectWrite (Cleartype & 
Grayscaling).

Interesting. imo, generally the ttfautohint output is superior to the original 
fonts' output,  though there are some glitches, e.g. dot accents are malformed.

-vern___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-21 Thread vernon adams
the new screenshots are posted at http://newtypography.co.uk/ttfauto/

there's still some 'curve flattening' at large sizes, but less marked
now. I will post some full waterfall tests later today to check all
point sizes up to 48 ish. 

if theres any particular format of test etc i should carry out, please
let me know.

thanks

-vern

On Tue, 2011-06-21 at 05:39 +0200, Werner LEMBERG wrote:
> Hello Vern!
> 
> 
> > updated ttfautohint from the repository & made a better waterfall
> > test page.
> > 
> > The ttfauto hinting looks much better imo, though still not 100%
> > perfect yet :)
> 
> Perhaps you can replace the images in your blog with the new ones?
> 
> > i have now also included a test of a version of Ubuntu Font with TTF
> > instructions tables replace by instructions from Fontforge's
> > autohint & autoinstruct process.
> 
> Thanks.
> 
> > have included the screenshots attached here.  Hope that's ok for
> > people - if not i can in future post them to the web only.
> > 
> > Chrome 12  on WinXP, GDI Cleartype.
> 
> Hmm.  I don't see attached images...
> 
> 
> Werner



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-20 Thread Werner LEMBERG

Hello Vern!


> updated ttfautohint from the repository & made a better waterfall
> test page.
> 
> The ttfauto hinting looks much better imo, though still not 100%
> perfect yet :)

Perhaps you can replace the images in your blog with the new ones?

> i have now also included a test of a version of Ubuntu Font with TTF
> instructions tables replace by instructions from Fontforge's
> autohint & autoinstruct process.

Thanks.

> have included the screenshots attached here.  Hope that's ok for
> people - if not i can in future post them to the web only.
> 
> Chrome 12  on WinXP, GDI Cleartype.

Hmm.  I don't see attached images...


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-20 Thread vernon adams
Hi

updated ttfautohint from the repository & made a better waterfall test page.

The ttfauto hinting looks much better imo, though still not 100% perfect yet :)

i have now also included a test of a version of Ubuntu Font with TTF 
instructions tables replace by instructions from Fontforge's autohint & 
autoinstruct process.

have included the screenshots attached here. Hope that's ok for people - if not 
i can in future post them to the web only.

Chrome 12  on WinXP, GDI Cleartype.





On 20 Jun 2011, at 19:44, Werner LEMBERG wrote:

> Using ftview, I see problems with FreeType also: The baseline is
> ragged.  And indeed, I've done an addition instead of a subtraction in
> the bytecode, making the computation of blue overshoot values
> incorrect.  This is fixed now in the git repository; please update and
> regenerate your test files!  Maybe this change is sufficient to
> improve the rendering with Windows GDI also.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-20 Thread Werner LEMBERG

>> Mhmm.  Up to now I've *never* seen a font rendered with FreeType
>> which shows such a large deviation from the Windows font engine.  I
>> believe that FreeType's output is quite trustworthy.
> 
> heh. Really?  Depends what you mean by 'large deviation' i guess.  I
> only ever seem to see differences between Windows font rendering and
> the other OS's :)

Interesting.  Could you give some examples?  Are those problems
related to FreeType?

>> Maybe there are problems with my bytecode.
> 
> Well - your bytecode seems to work fine for hinting under Freetype,
> but not under Windows GDI.

Actually, I've found a problem:

> You should probably look at the newest screenshots at
> http://code.newtypography.co.uk I tested Ubuntu Font & Droid Serif
> with the Windows' 'system font viewer' on XP and Win7, both with
> GDI-Cleartype.  Some very glitchy stuff happens with the ttfauto
> hinted fonts at larger sizes - 36pts on Ubuntu Font, 48pts on Droid
> Serif.  I have tested and replicated those glitches on different
> PC's so they are for real! :)

Using ftview, I see problems with FreeType also: The baseline is
ragged.  And indeed, I've done an addition instead of a subtraction in
the bytecode, making the computation of blue overshoot values
incorrect.  This is fixed now in the git repository; please update and
regenerate your test files!  Maybe this change is sufficient to
improve the rendering with Windows GDI also.

> Must do some full waterfall tests to see what else is happening at
> other sizes.  More testers and more eyes would be good too.

Indeed!  This is another reason why your messages should be sent to te
ft-devel list.

> The rendering glitches seem to be specific to the GDI-Cleartype
> rendering, and absent (as far as i can see) from the new (FireFox4 &
> IE9) DirectWrite-Cleartype rendering.

Well, please report whether the current git gives better results.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-20 Thread vernon adams

On 19 Jun 2011, at 16:37, Werner LEMBERG wrote:

> 
>> I'm guessing the render differences are caused by my tests being run
>> on WinXP & Win7.
> 
> Interesting.  Is Win7 OK?  Does WinXP only fail?


On Chrome the Win7 & XP were near identical, as the browser uses GDI on both 
OS's.
I will do some tests using the system font viewer in Win7 & XP, to remove the 
chance of browser interference.


> 
>> Are your ftview shots from Windows?
> 
> No, from Linux.  But they should be absolutely identical since ftview
> renders the glyphs directly as graphics, bypassing the operating
> system's font handling completely.

But isn't it the system's (in our case, Windows) font handling that needs to be 
targetted? No point making an autohinter that can output great graphics but 
renders the fonts not-so-great in the browser :)

> 
>> Interestingly Chrome on Linux seems to override a font's hinting
>> settings now!?  Could this be part of the improved font rendering
>> that's rumoured for ChromeOS?  Standard hinted, autohinted & not
>> hinted versions of Ubuntu Font render same on Ubuntu Chrome!
> 
> Hmm.  Overriding the user's preferences is not optimal IMHO.

I'm guessing that this behaviour is in line with the Chrome OS direction where 
the browser is at the core. Of course a user can still set own prefs for screen 
rendering, Chrome OS is linux after all.

> 
>> On Ubuntu Firefox4 the combination of ttfautohint + version 1 gasp
>> gives superior rendering to manually hinted original Ubuntu Font imo
>> (see attached pngs)
> 
> :-)
> 
>> conclusion - Legacy Windows is the worst target :)
> 
> However, I don't understand where the differences come from.  Nothing
> in the hinting instructions added by ttfautohint is specific to
> ClearType.  It uses a large number of twilight points which is
> probably unusual a bit, but this doesn't explain how the asymmetry can
> come into existence.

Well i have no technical knowledge of the rendering stuff behind Cleartype or 
Freetype, but my eyes tell me that they render the same TT instructions 
differently

> 
> Perhaps I can activate my contacts to the font people at Microsoft,
> asking for help in case the rendering problems you observe are also
> present in Win7.

That would be good. Any light shed on how Cleartype utilises TT instructions 
would be great. It's not purely an OS version issue though - the big difference 
on Windows is between GDI and DirectWrite. XP is GDI only (i believe), wherease 
Win7 apps are able to render under either GDI or DirectWrite. Hence - FFox 4 
and IE9 on Windows utilise DirectWrite for superior font rendering. It's very 
likely that Win8 will use primarilly DirectWrite (if not purely). Same goes for 
the new MS Phone OS. With DirectWrite, hinting instructions become almost 
arbitrary. So... main target for font hinting is Windows GDI imo.

many thanks

-vern


> 
> 
>   Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-20 Thread vernon adams

> 
>>> However, I don't understand where the differences come from.
>>> Nothing in the hinting instructions added by ttfautohint is
>>> specific to ClearType.  It uses a large number of twilight points
>>> which is probably unusual a bit, but this doesn't explain how the
>>> asymmetry can come into existence.
>> 
>> Well i have no technical knowledge of the rendering stuff behind
>> Cleartype or Freetype, but my eyes tell me that they render the same
>> TT instructions differently
> 
> Mhmm.  Up to now I've *never* seen a font rendered with FreeType which
> shows such a large deviation from the Windows font engine.  I believe
> that FreeType's output is quite trustworthy.


heh. Really?  Depends what you mean by 'large deviation' i guess.
I only ever seem to see differences between Windows font rendering and the 
other OS's :)


> 
> Maybe there are problems with my bytecode.

Well - your bytecode seems to work fine for hinting under Freetype, but not 
under Windows GDI.


You should probably look at the newest screenshots at 
http://code.newtypography.co.uk
I tested Ubuntu Font & Droid Serif with the Windows' 'system font viewer' on XP 
and Win7, both with GDI-Cleartype.
Some very glitchy stuff happens with the ttfauto hinted fonts at larger sizes - 
36pts on Ubuntu Font, 48pts on Droid Serif. I have tested and replicated those 
glitches on different PC's so they are for real! :)

Must do some full waterfall tests to see what else is happening at other sizes. 
 More testers and more eyes would be good too.

> 
>>> Perhaps I can activate my contacts to the font people at Microsoft,
>>> asking for help in case the rendering problems you observe are also
>>> present in Win7.
>> 
>> That would be good. Any light shed on how Cleartype utilises TT
>> instructions would be great.
> 
> But the bad rendering happens with and without ClearType, right?


The rendering glitches seem to be specific to the GDI-Cleartype rendering, and 
absent (as far as i can see) from the new (FireFox4 & IE9) 
DirectWrite-Cleartype rendering.


-vern



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-18 Thread vernon adams
I have added detailed shots to http://code.newtypography.co.uk/?p=898

At 400% magnification the difference does not look so great, but at 100% the 
difference in rendering is noticeable. I'll leave hinting interpreation to the 
experts, but to my eyes the vertical extremes of curves are not being flattened 
quite enough, thus creating extra sub-pixels (see the 400x magnifications).  
This seems to be the opposite of what is happening at other px sizes where the 
vertical extremes of curves tend to get overflattened, e.g. the 'O' at 15, 19, 
21px.

-vern



On 18 Jun 2011, at 04:42, Werner LEMBERG wrote:

>> Of note is that at larger sizes (20px - 30px) the rendering breaks up
>> on curves. Is it possible that the autohinter is not yet set to
>> instruct those larger sizes?
> 
> What do you mean with `breaks up'?  Please give more details what
> exactly you think is bad.  The hinting range is set to 8ppem-1000ppem,
> BTW, so these sizes are covered.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-18 Thread Dave Crossland
On 18 June 2011 04:42, Werner LEMBERG  wrote:
>
> Please post a URL
> where I can download the Ubuntu font you've used.

http://font.ubuntu.com

>> Of note is that at larger sizes (20px - 30px) the rendering breaks up
>> on curves. Is it possible that the autohinter is not yet set to
>> instruct those larger sizes?
>
> What do you mean with `breaks up'?

British sland for 'does not work well' :-)

> Please give more details what
> exactly you think is bad.  The hinting range is set to 8ppem-1000ppem,
> BTW, so these sizes are covered.

The original 'o' in Ubuntu appears more circular - more symmetrical in
both x and y directions - but the autohinted 'o' appears 'egg' shaped
with x symmetry but the top is thinner than the bottom.

>> Overall it's looking good to me. There are specific issues at
>> certain sizes, e.g uppercase bowls are flattening too abruptly at
>> the cap-height, see 'O' at 15, 19, 21px, but i'm assuming these
>> things can be tweaked away.
>
> Yes, this is what I've noted too.  I'll look into it.

Great!

-- 
Cheers
Dave

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread Werner LEMBERG

> The 'stretched' x-height could be a matter of taste, but personally
> i would like to see the autohinter err on the side of less
> stretching if possible.

Hmm.  I could add the ability to switch off x-size snapping, and I
could also change the rounding rules to something similar the SROUND
instruction offers.  But IMHO the first option leaves a lot of fuzzy
x-heights for various ppem values, and the second option just shifts
the issue to different sizes.  But maybe it makes it shift away from
the `important' sizes...  I'll add it to my TODO list.

> A gui to visibly tweak the pixel snap zones ;)

Well, *that* I won't provide, I think :-) However, I'll think about
how to make this easily editable, for example, by providing a simple
bytecode function which accepts a list of sizes where x-size snapping
should be disabled.  This list could be given as a command line
option.  Also added to my TODO list :-)


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread Werner LEMBERG

Vern,


> I have now added some simple upper & lowercase waterfall tests to
> 'ttfautohint tests' at http://code.newtypography.co.uk

thanks a lot for the tests and the test images!  Please post a URL
where I can download the Ubuntu font you've used.

> Of note is that at larger sizes (20px - 30px) the rendering breaks up
> on curves. Is it possible that the autohinter is not yet set to
> instruct those larger sizes?

What do you mean with `breaks up'?  Please give more details what
exactly you think is bad.  The hinting range is set to 8ppem-1000ppem,
BTW, so these sizes are covered.

> Overall it's looking good to me. There are specific issues at
> certain sizes, e.g uppercase bowls are flattening too abruptly at
> the cap-height, see 'O' at 15, 19, 21px, but i'm assuming these
> things can be tweaked away.

Yes, this is what I've noted too.  I'll look into it.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread vernon adams
I have now added some simple upper & lowercase waterfall tests to 'ttfautohint 
tests' at http://code.newtypography.co.uk

overshoots, undershoots and heights seem to be snapping accurately across 
glyphs - no irregularities  which usually seem a big issue with autohinters :)

Of note is that at larger sizes (20px - 30px) the rendering breaks up on 
curves. Is it possible that the autohinter is not yet set to instruct those 
larger sizes?

Overall it's looking good to me. There are specific issues at certain sizes, 
e.g uppercase bowls are flattening too abruptly at the cap-height, see 'O' at 
15, 19, 21px, but i'm assuming these things can be tweaked away.

Will run similar tests on The Droids and Bitstream Vera

-vern




On 17 Jun 2011, at 20:15, vernon adams wrote:

> 
> On 17 Jun 2011, at 19:43, Dave Crossland wrote:
> 
>> Hi,
>> 
>> On 17 June 2011 18:12, vernon adams  wrote:
>>> I've carried out some simple tests using ttfautohint with the Ubuntu Font on
>>> Win XP & Win7, Chrome12 & Firefox4.
>>> The screenshots are at http://code.newtypography.co.uk/
>> 
>> Awesome! Thanks Vernon!
> 
> 
> More tests are needed, i'm doing some. They only need to be simple -e.g.  
> 'ADHESIONALGURNFACE' & 'adhesionalgurnface' as waterfalls from 6px-44px, 
> because as yet we don't know 100% if we won't get the classic wobbly 
> overshoots, caps and x-heights at certain sizes.
> 
>> 
>>> Looks good so far, but i shall test more fonts, particularly a serif and a
>>> bold display face. I chose Ubuntu Font as i know it's well documented that
>>> Dalton Maag put a lot of professional hours into it's truetype instructions.
>> 
>> Fascinating. The autohinter produces more compact text horizontally -
>> there are often one more line in the Dalton-Maag hand/standard
>> hinting, and at 12px the autohinter makes the x-height noticably
>> higher. The i dot can be a bit weak compared to D-M, but perhaps they
>> are making it a bit heavy.
> 
> At 10px the autohinted version is easilly superior imho. The DirectWrite 
> renderings in Firefox 4 are prob better too. Some of that will be the 
> inclusion of a version1 gasp table replacing ye olde version 0 that Dalton 
> Maag used but it's also a good sign that the font is ok hinted. 
> 
> The 'stretched' x-height could be a matter of taste, but personally i would 
> like to see the autohinter err on the side of less stretching if possible.  A 
> gui to visibly tweak the pixel snap zones ;)


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread vernon adams

On 17 Jun 2011, at 19:43, Dave Crossland wrote:

> Hi,
> 
> On 17 June 2011 18:12, vernon adams  wrote:
>> I've carried out some simple tests using ttfautohint with the Ubuntu Font on
>> Win XP & Win7, Chrome12 & Firefox4.
>> The screenshots are at http://code.newtypography.co.uk/
> 
> Awesome! Thanks Vernon!


More tests are needed, i'm doing some. They only need to be simple -e.g.  
'ADHESIONALGURNFACE' & 'adhesionalgurnface' as waterfalls from 6px-44px, 
because as yet we don't know 100% if we won't get the classic wobbly 
overshoots, caps and x-heights at certain sizes.

> 
>> Looks good so far, but i shall test more fonts, particularly a serif and a
>> bold display face. I chose Ubuntu Font as i know it's well documented that
>> Dalton Maag put a lot of professional hours into it's truetype instructions.
> 
> Fascinating. The autohinter produces more compact text horizontally -
> there are often one more line in the Dalton-Maag hand/standard
> hinting, and at 12px the autohinter makes the x-height noticably
> higher. The i dot can be a bit weak compared to D-M, but perhaps they
> are making it a bit heavy.

At 10px the autohinted version is easilly superior imho. The DirectWrite 
renderings in Firefox 4 are prob better too. Some of that will be the inclusion 
of a version1 gasp table replacing ye olde version 0 that Dalton Maag used but 
it's also a good sign that the font is ok hinted. 

The 'stretched' x-height could be a matter of taste, but personally i would 
like to see the autohinter err on the side of less stretching if possible.  A 
gui to visibly tweak the pixel snap zones ;)

> 
> A Verdana comparison would be nice! :)

erm... am i allowed to alter the truetype tables in a Verdana font??


> 
> -- 
> Cheers
> Dave


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread Dave Crossland
On 17 June 2011 19:43, Dave Crossland  wrote:
> A Verdana comparison would be nice! :)

Yet, on consideration, impossible, due to proprietary licensing
restrictions. What a pain! :)

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread Dave Crossland
Hi,

On 17 June 2011 18:12, vernon adams  wrote:
> I've carried out some simple tests using ttfautohint with the Ubuntu Font on
> Win XP & Win7, Chrome12 & Firefox4.
> The screenshots are at http://code.newtypography.co.uk/

Awesome! Thanks Vernon!

> Looks good so far, but i shall test more fonts, particularly a serif and a
> bold display face. I chose Ubuntu Font as i know it's well documented that
> Dalton Maag put a lot of professional hours into it's truetype instructions.

Fascinating. The autohinter produces more compact text horizontally -
there are often one more line in the Dalton-Maag hand/standard
hinting, and at 12px the autohinter makes the x-height noticably
higher. The i dot can be a bit weak compared to D-M, but perhaps they
are making it a bit heavy.

A Verdana comparison would be nice! :)

-- 
Cheers
Dave

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] ttfautohint: How to install

2011-06-17 Thread vernon adams
I've carried out some simple tests using ttfautohint with the Ubuntu Font on 
Win XP & Win7, Chrome12 & Firefox4.
The screenshots are at http://code.newtypography.co.uk/

Looks good so far, but i shall test more fonts, particularly a serif and a bold 
display face. I chose Ubuntu Font as i know it's well documented that Dalton 
Maag put a lot of professional hours into it's truetype instructions.

thanks Werner!

vern




On 17 Jun 2011, at 08:31, Werner LEMBERG wrote:

> 
>> but i am embarrassed to admit that i have built the library but have
>> not found how to use the 'autohint' function :) a quick howto,
>> please!
> 
> One important thing I've forgotten to mention: You need the current
> git version of FreeType to test the ttfautohint library; the
> `configure' test for 2.4.4 in ttfautohint is a fake currently since
> 2.4.5 hasn't been released yet.  I know, I know, I should have done
> this already weeks ago :-|
> 
> In case you are running a Unix box (this includes recent Macs), please
> use the attached script which downloads and builds ttfautohint and
> FreeType in a subdirectory called `ttfautohint-build'.  For
> convenience, the created `ttfautohint' binary is static and not
> dependent on other libraries.  After successful compilation, you can
> find it in `ttfautohint-build/out/bin', and you can copy it to any
> other directory.
> 
> If you run the script another time, it will update the git
> repositories instead of downloading, then do a complete build again.
> 
> Calling `ttfautohint' is simple:
> 
>  ttfautohint  
> 
> for example
> 
>  ttfautohint Bevan.ttf Bevan-TA.ttf
> 
> As mentioned earlier, there aren't options right now.  Note that the
> program runs quite slow; adding a progress indicator is on my TODO
> list also.
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel