bugFree UCS Outline Fonts - Bugs: bug #35225, Combining Diacritical Marks...

 
 

bug #35225: Combining Diacritical Marks improperly positioned for Cyrillic capital letters

Submitted by:  Pander <pander>
Submitted on:  Tue 03 Jan 2012 02:05:45 PM UTC  
 
Category: individual character(s)Severity: 3 - Normal
Item Group: letter positioning poorStatus: Proceeding
Privacy: PublicAssigned to: Steve White <Stevan_White>
Open/Closed: OpenRelease: development

Add a New Comment (Rich MarkupRich 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)

Wed 04 Jan 2012 11:42:44 PM UTC, comment #9:

Hi

On Wed, Jan 4, 2012 at 12:53 PM, Pander

>
> How is an adjusted alignment of combining diacritical marks stored? Is it
> depending:
> a) only in the glyph of the comb. diacr.
> b) on a combination of glyph of the comb. diacr. and the script
> c) on a combination of glyph of the comb. diacr. and the glyph it is
> actually combining with
> d) on a combination of glyph of the comb. diacr., the glyph it is actually
> combining with and the script
>

Combining diacriticals could be implemented several ways.

The most brain-dead way is for them to be zero-width non-advancing letters, which simply draw on top of the preceding character. This is adequate sometimes, but requires no features.

However if the geometry of the base mark varies, usually it is preferred to vary the position of the mark.

The GPOS table built for this is 'mark'. It works by matching an "anchor" on the mark with a counterpart on the base character. Each is positioned by hand, according to the shapes of the characters. This matches (d) in your list except the match of the feature to script and language is more flexible than that.

All the TrueType tables may be activated by script/language. This one is no different.
The marks I just added are activated by default for Cyrillic script.

But there are other ways to implement them involving GSUB tables etc. Can get messy.

> I assumed c) or d) and, what I have gathered now, it is a) or b). Hence the
> misunderstanding on my part. But I asked to really understand this better, not
> directly related to my book. With better understanding I can make better
> contributions.
>
> By the way, strange that in HTML it works directly without having to set the
> script to Cyrillic.
>

The way it is currently set up, it is activated by simply being in Cyrillic regardless of language. (As I explained before, the script can be detected by Unicode range; detecting the language isn't practical.)

Now that I think of it, I don't know why XeTeX doesn't do this. Maybe a feature request?

Further to my previous remark about setting language: it is a good idea, especially in web browsers, for multiple reasons, to mark up any changes of natural language (just one of which is to activate font features specific to that language).

Cheers!

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Wed 04 Jan 2012 11:53:00 AM UTC, comment #8:

How is an adjusted alignment of combining diacritical marks stored? Is it depending:
a) only in the glyph of the comb. diacr.
b) on a combination of glyph of the comb. diacr. and the script
c) on a combination of glyph of the comb. diacr. and the glyph it is actually combining with
d) on a combination of glyph of the comb. diacr., the glyph it is actually combining with and the script

I assumed c) or d) and, what I have gathered now, it is a) or b). Hence the misunderstanding on my part. But I asked to really understand this better, not directly related to my book. With better understanding I can make better contributions.

By the way, strange that in HTML it works directly without having to set the script to Cyrillic.

I will let you also on the circumflex situation. Thanks for fixing FreeMono in SVN. :-)

Pander <pander>
Wed 04 Jan 2012 12:01:36 AM UTC, comment #7:

Well Pander, you asked.

One issue is, what does it mean for a given mark to align "nicely" for a given letter. How do you think an accent breve should be placed on an Arabic letter 'noon'?
It doesn't make sense.

But even when it sort of makes sense, somebody has to decide what "nice" means. Somebody has to personally place each mark so it looks nice. It takes some thought sometimes. Then it has to be done for each face. There are nearly 10,000 letters in FreeSerif alone, but nearly 2000 in the smallest FreeFont face. Far more than
2000 X 40 combining marks X 12 faces
decisions to make and maintain.

You could invent some hokey algorithm to place each mark on each letter. It would be pointless and wrong.

The right way to handle the issue, is to concentrate on a few marks that make sense in a specific language, and give the user some way to say which language they mean. OpenType is set up for this.

That's part of the story -- I could go on.
Is this for your book?

As to the compose sequence thing, hell I don't know. My guess is somebody screwed up. Prove me wrong, show me somebody somewhere really finds circumflex useful on Cyrillic letters, and I'll gladly make the change.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Tue 03 Jan 2012 09:19:30 PM UTC, comment #6:

Why should the positioning of combining diacritics be depending of the script in use? When using these two glyphs together in any script I would like them to align nicely. Cant the traditional different positioning be derived from the charactars used or is it different for the same Unicodes?

I'm also not sure when circumflex is used but it is defined in the x.org compose key sequences used by KDE, GNOME, etc. so I guess it should be supported. Its positioning can be reused from the others.

Example TeX file is in your email.

Pander <pander>
Tue 03 Jan 2012 08:33:34 PM UTC, comment #5:

OK I just committed changes including mark positioning for Cyrillic capitals in Mono, regarding several accents that are used in Cyrillic.

Could you attach your XeTeX test file? That would help.

I deliberately made a separate mark feature for Cyrillic because a different set of accents is used in Cyrillic than in Latin, and because the positioning is traditionally different. Greek also has a separate mark positioning feature in Serif.

If you want your text to look right, you should specify the language you intend.

I was unaware that the circumflex accent is used in Cyrillic. Could you explain why this is needed?

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Tue 03 Jan 2012 06:41:51 PM UTC, comment #4:

Also the combining diacritical marks that are OK in FreeSans and FreeSerif are not OK in FreeMono. All they need is the same offset as used by Latin small and capital letters. I will send you a PDF via email.

Pander <pander>
Tue 03 Jan 2012 06:25:22 PM UTC, comment #3:

When using \\addfontfeatures{Script=Cyrillic} in XeLaTeX it works fine except for the circonflex, see https://github.com/wspr/fontspec/issues/123 . That is wrongly positioned on both the Cyrillic captital case as the Cyrillic small letters.

Please fix the combining circonflexe accent U0302 for both the Cyrillic captital case as the Cyrillic small letters.

Please also consider positioning of the combining circonflexe accent to work also without having specifid Cyrillic script. The combining accents for e.g. Greek also work out of the box without specifiying script. This is especially handy when using Cyrillic words in e.g. English text. There is no need to disable this for other scripts then Cyrillic for these glyphs because that will always look misplaced.

Pander <pander>
Tue 03 Jan 2012 03:51:37 PM UTC, comment #2:

Indeed HTML in Firefox renders this correctly, also when adding these lines:

<span class="sa">&#x0410;&#x0301;</span> <span class="se">&#x0410;&#x0301;</span> <span class="mo">&#x0410;&#x0301;</span><br />
<span class="sa">&#x0420;&#x0301;</span> <span class="se">&#x0420;&#x0301;</span> <span class="mo">&#x0420;&#x0301;</span><br />
<span class="sa">&#x0410;&#x030F;</span> <span class="se">&#x0410;&#x030F;</span> <span class="mo">&#x0410;&#x030F;</span><br />

I'm using XeLaTeX with fontspec. Shall I report it to fontspec maintainers for them to try to reproduce it?

Pander <pander>
Tue 03 Jan 2012 03:42:48 PM UTC, comment #1:

Hi Pander!

FreeSerif and FreeSans have the appropriate mark positioning information. See attached a sample HTML file and what I see on my system.

It appears that either your test document or your font rendering system has a bug.

It would be helpful to know what software you used, running on which OS, to produce your image.

FreeMono does not contain mark positioning information for Cyrillic. Is this important? My understanding is that most marked letters that are actually used are encoded with special code points.

(file #24730, file #24731)

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Tue 03 Jan 2012 02:05:45 PM UTC, original submission:

Please position combining diacritical marks properly for Cyrillic capital letters in FreeSerif, FreeSans and FreeMono (at least in all Regular fonts). This concerns 26 combinations per font. The attachment will show how it is for revision 1970 from svn.

Pander <pander>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #24730:  Cyrillic-Diacritics-test.jpg added by Stevan_White (6kB - image/jpeg - A quick HTML test of diacritics.)
file #24731:  Cyr.html added by Stevan_White (989B - text/html - A quick HTML test of diacritics.)
file #24729:  reposition.png added by pander (248kB - image/png - Combining Diacritical Marks improperly positioned for Cyrillic capital letters)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by Stevan_White (Updated the item)
  • -unavailable- added by pander (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Jan 2012 08:33:34 PM UTCStevan_WhiteStatusNeed info=>Proceeding
    Tue 03 Jan 2012 03:42:48 PM UTCStevan_WhiteAttached File-=>Added Cyrillic-Diacritics-test.jpg, #24730
      Attached File-=>Added Cyr.html, #24731
      StatusNone=>Need info
      Assigned toNone=>Stevan_White
    Tue 03 Jan 2012 02:05:45 PM UTCpanderAttached File-=>Added reposition.png, #24729

    Back to the top


    Powered by Savane 3.1-cleanup