bugFree UCS Outline Fonts - Bugs: bug #36085, Problems with Persian digits

 
 

bug #36085: Problems with Persian digits

Submitted by:  Masoud Pourmoosa <amp3030>
Submitted on:  Wed 04 Apr 2012 01:34:25 PM UTC  
 
Category: character rangeSeverity: 3 - Normal
Item Group: glyph(s) uglyStatus: Fixed
Privacy: PublicAssigned to: Steve White <Stevan_White>
Open/Closed: ClosedRelease: development

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 15 Apr 2012 04:06:26 PM UTC, comment #11:

Hi Steve,
I like tha current state. Thank you.

Masoud Pourmoosa <amp3030>
Tue 10 Apr 2012 09:31:28 AM UTC, comment #10:

I decided to make the spacing of the digits uniform ("tabular").
This is more useful generally than proportionally-spaced digits. (For example, a list of years on separate lines all have the same width.) And it doesn't look bad. Now in SVN.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Thu 05 Apr 2012 06:33:33 PM UTC, comment #9:

About spacing: actually I didn't really care when playing with glyphs. I usually test all possible combinations of digits to see if there is too much or too little space between them. Now I think you are right: it's a good idea to at least standardize spacing for similar characters (like right spacing of 2, 3, 4, 6 and left spacing of 1, 2, 3, 4).

Thanks a million times for your work in making this font, and also in helping me learn something about font design :)

Masoud Pourmoosa <amp3030>
Thu 05 Apr 2012 05:46:34 PM UTC, comment #8:

Spacing

The 2 goes well past its right bound. Is this a good idea? I don't thing any other letter in the Arabic range does this.
The 6 is only flat with the right bound.

Other stuff

It is strongly advised to put a node at each point of a contour where the outline becomes either horizontal or vertical ("extrema"). It helps various algorithms regarding smoothing, etc. (So do the blue lines, but that is something different.)

The outer contour of a glyph should always be drawn clockwise (The points are numbered. In FontForge, you can see a little arrow that shows the direction). This is part of the TrueType spec, and bad things happen if you ignore that.

text?

Ah...well, the FontForge manual, the Apple TrueType manual, the the OpenType spec, Adobe Type1 spec, to begin with. Unfortunately, font technology is extremely complicated and scattered, often just for historical and legal reasons. Takes a long time to absorb -- you really have to work with it. There are some books, but I haven't seen one I would really recommend for beginning purposes.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Thu 05 Apr 2012 05:17:34 PM UTC, comment #7:

Hi Steve,

I don't see any problem in the digits. Also in 2 and 6 there is nothing wrong with spacing, I think.

I don't know the meaning of these:

  • put points in at horizontals/verticals (it should have something to do with the blue lines, but what are them?)
  • made all outer outlines clockwise (???)

Do you know a good text that explain these things?

Thank you.

Masoud Pourmoosa <amp3030>
Thu 05 Apr 2012 04:46:53 PM UTC, comment #6:

Hi Masoud,

I implemented your letters with some technical changes.

Would you please review them?

Especially note the horizontal spacing doesn't look right, especially for 2 and 6.

The technical changes included:
reducing points unnecessary to describe shape.
put points in at horizontals/verticals
made all outer outlines clockwise
rounded to integer

Thanks!

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Thu 05 Apr 2012 03:26:02 PM UTC, comment #5:

I couldn't figure out how to use svn diff.

I made a new font and copied the stuff into it. I enhanced the glyphs with respect to FreeSerifFa that I posted before.

I hope it is usable now.

(file #25590)

Masoud Pourmoosa <amp3030>
Thu 05 Apr 2012 08:24:08 AM UTC, comment #4:

Alternatively,

Just create a new font file, and paste your glyphs in at the proper Unicode points.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Wed 04 Apr 2012 06:14:59 PM UTC, comment #3:

Hi Masoud,

Could you re-do that with a couple of changes:
1) start with the latest version of FreeFont
svn up
(not svn co)
(those particular letters didn't change, but just to be safe.

2) select your glyphs and
Clear Hints
Clear Instructions

3) svn diff FreeSerif.sfd

(I'm not sure why an SVN diff should be different -- it's just what I do.)

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Wed 04 Apr 2012 02:55:31 PM UTC, comment #2:

Hi,

I will do what you said tonight. What I did today was the following:

1. I got a fresh version of rev2195, and copied to PersianDigits.sfd

2. I changed the glyphs in PersianDigits.sfd (actually I copied the glyphs from the file that I had posted in bug 34190.

3. I did this in terminal:
diff -Naur FreeSerif.sfd PersianDigits.sfd > PersianDigits.patch

Maybe I messed up somewhere, or maybe the name of FreeSerifFa is enetering in the patch.

Masoud Pourmoosa <amp3030>
Wed 04 Apr 2012 02:44:17 PM UTC, comment #1:

Hi Masoud!

I would apply your patch, but

  • the patch didn't work
  • there is a lot of stuff in the patch that has nothing to do with the glyphs. (e.g. TrueType instructions)

Am I doing something wrong with the patch?

I son't know what it would be, but anyway let's get a cleaner patch. Try the following:

1) move your changed copy to another file
2) svn co FreeSerif.sfd
3) open both files with FontForge
4) copy your glyphs to the clean copy
5) select the copied glyphs, pull down "remove hints", "Delete Instructions".
6) save the copy
7) svn diff FreeSerif.sfd > PersianDigits2.patch

==========================================
Here's what happened when I tried to apply the patch.

$ svn up -r 2195 FreeSerif.sfd
U FreeSerif.sfd
Updated to revision 2195.
$ patch -p0 FreeSerif.sfd < ~/PersianDigits.patch
patching file FreeSerif.sfd
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 2021.
...
13 out of 13 hunks FAILED -- saving rejects to file FreeSerif.sfd.rej

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Wed 04 Apr 2012 01:34:25 PM UTC, original submission:

Persian digits (U+06F0 ... U+06F9) are not vertically aligned: bottoms of 1, 2, 6, and 9 are lower than others. Also 3, 4, and 5 need a bit of counterclockwise rotation. 5 is too short compared to others, and 7 is asymmetric.

I tried to fix all these problems (and some other ones) in the patch I am posting here.

Masoud Pourmoosa <amp3030>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25590:  OnlyPersianDigits1.sfd added by amp3030 (9KiB - application/octet-stream)
file #25566:  PersianDigits.patch added by amp3030 (16KiB - text/x-patch - Enhancement to Persian digits)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by Stevan_White (Posted a comment)
  • -unavailable- added by amp3030 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 May 2012 03:41:24 PM UTCStevan_WhiteStatusFix posted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 15 Apr 2012 05:55:33 PM UTCStevan_WhiteStatusProceeding=>Fix posted
    Thu 05 Apr 2012 03:26:02 PM UTCamp3030Attached File-=>Added OnlyPersianDigits1.sfd, #25590
    Wed 04 Apr 2012 02:44:58 PM UTCStevan_WhiteStatusNone=>Proceeding
      Assigned toNone=>Stevan_White
    Wed 04 Apr 2012 01:34:25 PM UTCamp3030Attached File-=>Added PersianDigits.patch, #25566

    Back to the top


    Powered by Savane 3.1-cleanup1