Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-03-12 Thread Werner LEMBERG

 You must not use ftview to test whether glyphs are correctly joined!
 This programs inserts an additional pixel horizontally between each
 glyph.  For simple stuff, use ftstring.

Unfortunately, it doesn't support embolding...  Patches welcomed :-)


Werner

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-03-12 Thread pravin....@gmail.com
On 12 March 2012 13:37, Werner LEMBERG w...@gnu.org wrote:


  You must not use ftview to test whether glyphs are correctly joined!
  This programs inserts an additional pixel horizontally between each
  glyph.  For simple stuff, use ftstring.

 Unfortunately, it doesn't support embolding...  Patches welcomed :-)


Thanks, i was not aware. In that case can i get patch for freetype with it
i can do better testing.

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-03-12 Thread Werner LEMBERG

 With patch it is better now, see the attached image.

 You must not use ftview to test whether glyphs are correctly
 joined!  This programs inserts an additional pixel horizontally
 between each glyph.  For simple stuff, use ftstring.  For complex
 shaping, you need a demo program from, say, Pango.
 
 I hope this comment does not reflect on my patch that is intended to
 remove excessive space between emboldened glyphs in ftview.

No, it reflects Pravin's `better'.  I just wanted to make sure that
people know that a one pixel space between adjacent glyphs is
expected, since ftview inserts this deliberately -- this demo program
often has to display zero-width, empty characters, and it is quite
useful to see a minimal movement of surrounding glyphs if you increase
or decrease the glyph index.


Werner

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-29 Thread suzuki toshiya
I tried this issue (unflat horizontal stroke of Lohit Devanagari when
it is autoembolden) on Mac OS X 10.6 on amd64 platform, the issue is
reproduced. The result is attached. I was afraid that some overflow
occurs in ILP32 platform and does not occur in LP64 platform, but it
would not be so simple.

I will check the situation in other GNU/Linux in tomorrow.

Regards,
mpsuzuki

suzuki toshiya wrote:
 Dear Alexei,
 
 Thank you for trying to reproduce this issue.
 Today I'm out of my office and I don't bring 64-bit machine,
 but I have some (Debian GNU/Linux and Mac OS X on amd64),
 I will try within a few days.
 
 Alexei Podtelezhnikov wrote:
 On Fri, Feb 24, 2012 at 9:54 PM, suzuki toshiya
 mpsuz...@hiroshima-u.ac.jp wrote:
 I think there are 2 issues in auto-embolden Lohit Devanagari;
 a) disconnection of horizontal strokes (which should be connected with 
 previous/next glyph)4.8
 It looks like advance value is incorrectly adjusted or calculated.
 I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
 freetype-2.4.8.

 b) unflat horizontal stroke at the left side.
 If you look closer the unflatness results from incorrect outline tags
 at the outline point.
 I was NOT able to reproduce this on x86-64 with very lightly patched
 freetype-2.4.8.

 Pravin, can you check Fedora x86_64 spin?
 
 
 ___
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype-devel

inline: lohit_hi-macosx106.gif___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-28 Thread pravin....@gmail.com
On 27 February 2012 22:52, Alexei Podtelezhnikov apodt...@gmail.com wrote:

 On Mon, Feb 27, 2012 at 10:41 AM, pravin@gmail.com
 pravin@gmail.com wrote:
  On 27 February 2012 19:36, Alexei Podtelezhnikov apodt...@gmail.com
 wrote:
  On Mon, Feb 27, 2012 at 2:12 AM, pravin@gmail.com
  pravin@gmail.com wrote:
   On 27 February 2012 07:58, Alexei Podtelezhnikov apodt...@gmail.com
   wrote:
   mpsuz...@hiroshima-u.ac.jp wrote:
I think there are 2 issues in auto-embolden Lohit Devanagari;
a) disconnection of horizontal strokes (which should be connected
with
previous/next glyph)4.8
  
   It looks like advance value is incorrectly adjusted or calculated.
   I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
   freetype-2.4.8.
  
   Pravin, can you check Fedora x86_64 spin?
  
   Still the major problem is broken upper horizontal BAR, in local
   language we
   call it Shirorekha. It should be continuous as it is in Lohit normal.
 
  In this particular font the glyph width is larger than it advance,
  which is unusual.
  FT_Outline_Embolden does not adjust glyph metrics. So I wonder how you
  handle
  the advance values or which higher level text layout library does that
 for
  you.
 
 
  Earlier even me too thought it might be problem. But even if we make
 right
  and left kerning ZERO result does not change.
 
  Text कखगघचाक  u0915u0916
  I have changes width of only above characters in font  (see
  u'\u0915\u0916\u0917\u0918\u091a\u093e\u0915' characters)
  Updated TTF file http://pravins.fedorapeople.org/Lohit-Devanagari.ttf
  Updated Sfd file http://pravins.fedorapeople.org/Lohit-Devanagari.sfd
  Screenshot http://pravins.fedorapeople.org/Screenshot-lohit-test-3.png
 
  Does hinting makes any difference here with Bold?
 

 Kerning and advance are different beasts. Your emails lack critical
 details. Please give more details. We need a snippet of your code to
 understand why advance values increased larger than they should have
 been. I am pretty sure it is about the glyph advance. As you can see
 the whole string is wider than the original one, probably a bit too
 much.


Yes, width is definitely looks more than expected.  did you able to
reproduce it?
I took above screenshot in gedit
gnome-shell-3.2.2.1-1.fc16.x86_64 pango-1.29.4-1.fc16.x86_64
freetype-2.4.8-2.fc17.x86_64 gedit-3.2.6-1.fc16.x86_64

yes I think  pango is also involve in this. Can i test Freetype
auto-embolden with any freetype DEMO?

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-28 Thread suzuki toshiya
Please show Lohit Devanagari with ftview, at appropriate size,
then, hit space bar once. You may find the auto-embolden shapes.
If you hit space bar once more, you may find the auto-oblique shapes.

Regards,
mpsuzuki

pravin@gmail.com wrote:
 yes I think  pango is also involve in this. Can i test Freetype
 auto-embolden with any freetype DEMO?
 
 Thanks,
 Pravin Satpute
 


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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-28 Thread Alexei Podtelezhnikov
ftstring is supposed to be an exemplar string renderer for other
libraries because it handles lsb_delta and rsb_delta. This is short of
kerning but at least it is better than ftview. Unfortunately,
auto-emboldened fonts are not a part of ftstring's functionality. So
other libraries could not copy the code from there, I guess.

Repeating myself, auto-emboldened glyphs should get auto-increased
advances according to the
strength of the emboldening and not based on the width. I an not sure
how to properly handle this.

On Tue, Feb 28, 2012 at 10:43 AM, suzuki toshiya
mpsuz...@hiroshima-u.ac.jp wrote:
 Please show Lohit Devanagari with ftview, at appropriate size,
 then, hit space bar once. You may find the auto-embolden shapes.
 If you hit space bar once more, you may find the auto-oblique shapes.

 Regards,
 mpsuzuki

 pravin@gmail.com wrote:
 yes I think  pango is also involve in this. Can i test Freetype
 auto-embolden with any freetype DEMO?

 Thanks,
 Pravin Satpute





-- 
Alexei A. Podtelezhnikov, PhD

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-28 Thread Werner LEMBERG

 Can i test Freetype auto-embolden with any freetype DEMO?

Yes, e.g. with ftview.  Press the space key to cycle through the
rendering modes; one of them does artificial emboldening.


Werner

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-27 Thread Alexei Podtelezhnikov
On Mon, Feb 27, 2012 at 2:12 AM, pravin@gmail.com
pravin@gmail.com wrote:
 On 27 February 2012 07:58, Alexei Podtelezhnikov apodt...@gmail.com wrote:
 mpsuz...@hiroshima-u.ac.jp wrote:
  I think there are 2 issues in auto-embolden Lohit Devanagari;
  a) disconnection of horizontal strokes (which should be connected with
  previous/next glyph)4.8

 It looks like advance value is incorrectly adjusted or calculated.
 I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
 freetype-2.4.8.

 Pravin, can you check Fedora x86_64 spin?

 Still the major problem is broken upper horizontal BAR, in local language we
 call it Shirorekha. It should be continuous as it is in Lohit normal.

In this particular font the glyph width is larger than it advance,
which is unusual.
FT_Outline_Embolden does not adjust glyph metrics. So I wonder how you handle
the advance values or which higher level text layout library does that for you.

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-27 Thread Antoine Leca
Alexei Podtelezhnikov wrote:
 In this particular font the glyph width is larger than it advance,
 which is unusual.
... but it is typical of Devanagari fonts, and in general of several
hanging scripts, where the upper bar is required to connect at both
ends for most glyphs.

I am not sure if it was done because of rounding errors while
digitalizing the designs, or if this feature was put there to make sure
the line is connected even if the outlines are somehow damaged by
rounding; but in any case the Freetype library (and any upper-level
libraries as well) should expect such a case if it is to handle
Devanagari fonts.


Antoine

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-27 Thread Alexei Podtelezhnikov
On Mon, Feb 27, 2012 at 10:41 AM, pravin@gmail.com
pravin@gmail.com wrote:
 On 27 February 2012 19:36, Alexei Podtelezhnikov apodt...@gmail.com wrote:
 On Mon, Feb 27, 2012 at 2:12 AM, pravin@gmail.com
 pravin@gmail.com wrote:
  On 27 February 2012 07:58, Alexei Podtelezhnikov apodt...@gmail.com
  wrote:
  mpsuz...@hiroshima-u.ac.jp wrote:
   I think there are 2 issues in auto-embolden Lohit Devanagari;
   a) disconnection of horizontal strokes (which should be connected
   with
   previous/next glyph)4.8
 
  It looks like advance value is incorrectly adjusted or calculated.
  I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
  freetype-2.4.8.
 
  Pravin, can you check Fedora x86_64 spin?
 
  Still the major problem is broken upper horizontal BAR, in local
  language we
  call it Shirorekha. It should be continuous as it is in Lohit normal.

 In this particular font the glyph width is larger than it advance,
 which is unusual.
 FT_Outline_Embolden does not adjust glyph metrics. So I wonder how you
 handle
 the advance values or which higher level text layout library does that for
 you.


 Earlier even me too thought it might be problem. But even if we make right
 and left kerning ZERO result does not change.

 Text कखगघचाक  u0915u0916
 I have changes width of only above characters in font  (see
 u'\u0915\u0916\u0917\u0918\u091a\u093e\u0915' characters)
 Updated TTF file http://pravins.fedorapeople.org/Lohit-Devanagari.ttf
 Updated Sfd file http://pravins.fedorapeople.org/Lohit-Devanagari.sfd
 Screenshot http://pravins.fedorapeople.org/Screenshot-lohit-test-3.png

 Does hinting makes any difference here with Bold?


Kerning and advance are different beasts. Your emails lack critical
details. Please give more details. We need a snippet of your code to
understand why advance values increased larger than they should have
been. I am pretty sure it is about the glyph advance. As you can see
the whole string is wider than the original one, probably a bit too
much.

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-27 Thread Alexei Podtelezhnikov
On Mon, Feb 27, 2012 at 12:17 PM, Antoine Leca
antoine-freet...@leca-marti.org wrote:
 Alexei Podtelezhnikov wrote:
 In this particular font the glyph width is larger than it advance,
 which is unusual.
 ... but it is typical of Devanagari fonts, and in general of several
 hanging scripts, where the upper bar is required to connect at both
 ends for most glyphs.

 I am not sure if it was done because of rounding errors while
 digitalizing the designs, or if this feature was put there to make sure
 the line is connected even if the outlines are somehow damaged by
 rounding; but in any case the Freetype library (and any upper-level
 libraries as well) should expect such a case if it is to handle
 Devanagari fonts.

I'm afraid that something relies on the width to predict the advance
instead of simply adding the emboldening strength to the original
advance. Simple as that. I doubt that this is FreeType's responsibility.

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-27 Thread pravin....@gmail.com
On 27 February 2012 19:36, Alexei Podtelezhnikov apodt...@gmail.com wrote:

 On Mon, Feb 27, 2012 at 2:12 AM, pravin@gmail.com
 pravin@gmail.com wrote:
  On 27 February 2012 07:58, Alexei Podtelezhnikov apodt...@gmail.com
 wrote:
  mpsuz...@hiroshima-u.ac.jp wrote:
   I think there are 2 issues in auto-embolden Lohit Devanagari;
   a) disconnection of horizontal strokes (which should be connected with
   previous/next glyph)4.8
 
  It looks like advance value is incorrectly adjusted or calculated.
  I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
  freetype-2.4.8.
 
  Pravin, can you check Fedora x86_64 spin?
 
  Still the major problem is broken upper horizontal BAR, in local
 language we
  call it Shirorekha. It should be continuous as it is in Lohit normal.

 In this particular font the glyph width is larger than it advance,
 which is unusual.
 FT_Outline_Embolden does not adjust glyph metrics. So I wonder how you
 handle
 the advance values or which higher level text layout library does that for
 you.


Earlier even me too thought it might be problem. But even if we make right
and left kerning ZERO result does not change.

Text कखगघचाक  u0915u0916
I have changes width of only above characters in font  (see
u'\u0915\u0916\u0917\u0918\u091a\u093e\u0915' characters)
Updated TTF file http://pravins.fedorapeople.org/Lohit-Devanagari.ttf
Updated Sfd file http://pravins.fedorapeople.org/Lohit-Devanagari.sfd
Screenshot http://pravins.fedorapeople.org/Screenshot-lohit-test-3.png

Does hinting makes any difference here with Bold?

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-26 Thread Alexei Podtelezhnikov
On Fri, Feb 24, 2012 at 9:54 PM, suzuki toshiya
mpsuz...@hiroshima-u.ac.jp wrote:

 I think there are 2 issues in auto-embolden Lohit Devanagari;
 a) disconnection of horizontal strokes (which should be connected with 
 previous/next glyph)4.8

It looks like advance value is incorrectly adjusted or calculated.
I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
freetype-2.4.8.

 b) unflat horizontal stroke at the left side.

If you look closer the unflatness results from incorrect outline tags
at the outline point.
I was NOT able to reproduce this on x86-64 with very lightly patched
freetype-2.4.8.

Pravin, can you check Fedora x86_64 spin?

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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-26 Thread suzuki toshiya
Dear Alexei,

Thank you for trying to reproduce this issue.
Today I'm out of my office and I don't bring 64-bit machine,
but I have some (Debian GNU/Linux and Mac OS X on amd64),
I will try within a few days.

Alexei Podtelezhnikov wrote:
 On Fri, Feb 24, 2012 at 9:54 PM, suzuki toshiya
 mpsuz...@hiroshima-u.ac.jp wrote:
 I think there are 2 issues in auto-embolden Lohit Devanagari;
 a) disconnection of horizontal strokes (which should be connected with 
 previous/next glyph)4.8
 
 It looks like advance value is incorrectly adjusted or calculated.
 I was able to reproduce this on Fedora 16 x86_64, 64-bit build of
 freetype-2.4.8.
 
 b) unflat horizontal stroke at the left side.
 
 If you look closer the unflatness results from incorrect outline tags
 at the outline point.
 I was NOT able to reproduce this on x86-64 with very lightly patched
 freetype-2.4.8.
 
 Pravin, can you check Fedora x86_64 spin?


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


Re: [ft-devel] Auto Embolding of Lohit Devanagari

2012-02-25 Thread pravin....@gmail.com
2012/2/25 suzuki toshiya mpsuz...@hiroshima-u.ac.jp

 Dear Alexei,

 Thank you again for comment. I think your comment (the lower-left
 corner of the horizontal stroke is interpreted as Bezier curve)
 is reasonable, although yet I've not checked how they are interpreted
 yet (sorry for my laziness).

 I think there are 2 issues in auto-embolden Lohit Devanagari;
 a) disconnection of horizontal strokes (which should be connected with
 previous/next glyph)
 b) unflat horizontal stroke at the left side.

 I think issue a) occurs in all glyphs, but issue b) is not for all
 (however, many glyphs show issue b)). In addition, issue b) is not
 only for Devanagari. Lohit shows same issue on some ASCII characters
 (like #, =), so this issue should not be expected as Devanagari
 only problem.

 I attached a pair of U+090A and U+090B, showing issue b) (U+090A)
 and showing no issue b) (U+090B).


In attached pair if we check normal version of same pair horizontal upper
bar is connected but after Bold it is broken in between.
Do let me know if any changes required from font side i tried some though.

Thanks,
Pravin Satpute




 Also I uploaded 2 pictures of the outline parsed by fontforge,
 for U+090A and U+090B. I think there is a difference at the lower-left
 corner between these 2 glyphs, and it may cause issue b).
 http://home.hiroshima-u.ac.jp/mpsuzuki/Lohit-Devanagari_U+090A.gif
 http://home.hiroshima-u.ac.jp/mpsuzuki/Lohit-Devanagari_U+090B.gif
 Further investigation is needed, please wait (sorry again for my laziness).

 Regards,
 mpsuzuki

 Werner LEMBERG wrote:
  Lohit Devanagari does not have Bold variant and presently using
  auto bold algorithm.  It does not work correctly in gnome see
  http://pravins.fedorapeople.org/Screenshot.png
  It seems that FreeType 2.4.5 shows same problem.
  I think it is clear what is happening: instead of interpreting a
  point as a corner between two straight segments, this point is
  considered a control point of a conic Bezier curve.  Since every
  glyph suffers from it, could it be a first or a last segment? An
  off-by-one error somewhere?
 
  David B., can you have a look, please?  The thread starts here:
 
http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00090.html
 
  The font can be downloaded here:
 
https://fedorahosted.org/lohit/
 
 
  Werner
 
  ___
  Freetype-devel mailing list
  Freetype-devel@nongnu.org
  https://lists.nongnu.org/mailman/listinfo/freetype-devel


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