Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-06-17 Thread Alexei Podtelezhnikov
On Sat, Jun 16, 2012 at 11:13 PM, Infinality infinal...@infinality.net wrote:
 Well, I can agree with you that it may not be the proper spot for doing the
 rounding;  I just can't imagine why anybody would ever want it to appear the
 way it does now unless no hinting is being used at all.

If you think that rounding the emboldening strength is sufficient, you
must assume that the original outline is already well hinted, which is
just wrong. There is no way you can shortcut the hinting like that.




 On 06/16/2012 10:07 PM, Alexei Podtelezhnikov wrote:

 On Fri, Jun 15, 2012 at 5:31 PM, Infinality infinal...@infinality.net
 wrote:

 Sorry to resurrect an old thread here, but I think I have a solution that
 preserves the addition of Y-weight at larger font sizes, while still
 keeping
 the blur to a minimum:

 In FT_Outline_Embolden (which is now FT_Outline_Embolden_XY), do this to
 ystrength:
    ystrength = FT_PIX_FLOOR ( ystrength );

 This rounding belongs at a higher level. Nothing stops an enlightened
 user from properly rounding the strength before calling this function.
 There is no need to hard code this at the low level function or
 library. There may be a case to be made for this rounding in
 FT_GlyphSlot_Embolden. Even then I would argue that hinting belongs to
 hinting, it can follow the emboldening but should not be so invasive,


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


Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-06-16 Thread Alexei Podtelezhnikov
On Fri, Jun 15, 2012 at 5:31 PM, Infinality infinal...@infinality.net wrote:
 Sorry to resurrect an old thread here, but I think I have a solution that
 preserves the addition of Y-weight at larger font sizes, while still keeping
 the blur to a minimum:

 In FT_Outline_Embolden (which is now FT_Outline_Embolden_XY), do this to
 ystrength:
    ystrength = FT_PIX_FLOOR ( ystrength );

This rounding belongs at a higher level. Nothing stops an enlightened
user from properly rounding the strength before calling this function.
There is no need to hard code this at the low level function or
library. There may be a case to be made for this rounding in
FT_GlyphSlot_Embolden. Even then I would argue that hinting belongs to
hinting, it can follow the emboldening but should not be so invasive,

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


Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-06-16 Thread Infinality
Well, I can agree with you that it may not be the proper spot for doing 
the rounding;  I just can't imagine why anybody would ever want it to 
appear the way it does now unless no hinting is being used at all.


On 06/16/2012 10:07 PM, Alexei Podtelezhnikov wrote:

On Fri, Jun 15, 2012 at 5:31 PM, Infinality infinal...@infinality.net wrote:

Sorry to resurrect an old thread here, but I think I have a solution that
preserves the addition of Y-weight at larger font sizes, while still keeping
the blur to a minimum:

In FT_Outline_Embolden (which is now FT_Outline_Embolden_XY), do this to
ystrength:
ystrength = FT_PIX_FLOOR ( ystrength );

This rounding belongs at a higher level. Nothing stops an enlightened
user from properly rounding the strength before calling this function.
There is no need to hard code this at the low level function or
library. There may be a case to be made for this rounding in
FT_GlyphSlot_Embolden. Even then I would argue that hinting belongs to
hinting, it can follow the emboldening but should not be so invasive,




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


Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-06-15 Thread Infinality
Sorry to resurrect an old thread here, but I think I have a solution 
that preserves the addition of Y-weight at larger font sizes, while 
still keeping the blur to a minimum:


In FT_Outline_Embolden (which is now FT_Outline_Embolden_XY), do this to 
ystrength:

ystrength = FT_PIX_FLOOR ( ystrength );

Since the emboldening function uses 64 to equal ~1 pixel, rounding down 
to the nearest whole pixel removes the blur.  Not sure if you're willing 
to implement this at this point, given that developers have the option 
of using the XY function, but wanted to mention it anyway.




On 01/04/2012 01:54 AM, Werner LEMBERG wrote:

The code has been written in a quite generic way.  IMHO, you need both
horizontal and vertical emboldening for larger font sizes.  I fully
agree that it is suboptimal for small font sizes which are going to be
used in combination with other fonts.


In my patches, I disable the y direction completely, and the
aesthetic improvements are dramatic, in my opinion.  Is this
something that can be done in Freetype instead?  Or perhaps can the
function be split into two?

It can't be done currently.  Please suggest a new API.  And provide a
patch (with a ChangeLog entry) :-)


 Werner




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


Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-01-03 Thread Infinality
Another thought I had just after sending the last email...  Consider any 
font that has a bold face available:  Arial, DejaVu, Lucida Grande, 
etc..  Their bold faces do not end up being any taller than the regular, 
non-bold faces.  So, the fact that FT_Outline_Embolden() is making the 
glyphs taller seems to go against common practice.


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


Re: [ft-devel] FT_Outline_Embolden() is Blurry

2012-01-03 Thread Werner LEMBERG

 In ftoutln.c there is a function called FT_Outline_Embolden().  This
 is used to create artificial emboldening, and is used when
 fontconfig requests emboldening for fonts that don't have a bold
 face available.  Near the end of this function are these two lines,
 which actually perform the emboldening, in the x and y directions:
 
 outline-points[n].x = v_cur.x + strength + in.x;
 outline-points[n].y = v_cur.y + strength + in.y;
 
 Emboldening in the y direction can happen in fractions of a pixel,
 and this ends up being only in the up direction.  The result of
 this is a blurry fringe on the tops of letters.  While this may be
 technically correct, I'm wondering if *anyone* actually thinks this
 looks nice.

The code has been written in a quite generic way.  IMHO, you need both
horizontal and vertical emboldening for larger font sizes.  I fully
agree that it is suboptimal for small font sizes which are going to be
used in combination with other fonts.

 In my patches, I disable the y direction completely, and the
 aesthetic improvements are dramatic, in my opinion.  Is this
 something that can be done in Freetype instead?  Or perhaps can the
 function be split into two?

It can't be done currently.  Please suggest a new API.  And provide a
patch (with a ChangeLog entry) :-)


Werner

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