bugFree UCS Outline Fonts - Bugs: bug #51064, 'c2sc' converts some capitals to...

 
 

bug #51064: 'c2sc' converts some capitals to lowercase, not small caps

Submitter:  David Corbett <dscorbett>
Submitted:  Thu 18 May 2017 07:46:39 PM UTC
   
 
Category:  individual character(s) Severity:  3 - Normal
Item Group:  character substitution issue Status:  Fix posted
Privacy:  Public Assigned to:  Stevan_White
Open/Closed:  Open Release:  * development
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 11 Jul 2017 09:46:46 PM UTC, comment #12: 
  • In FreeMono, Oogonek is a Latin glyph but it uses a Cyrillic lookup, so the

lookup never applies.
[fixed]

  • In FreeSerif Bold, On_dvojnoj_odnookij becomes sc.on_odinokij.

[deleted]

  • In FreeSans, the 'smcp' of escyr is sc.c. Therefore, escyr is not a small

capital glyph, and it is inappropriate as the result of 'c2sc'.
[that is, escyr in Sans doesn't change form in small caps.
there should be no 'smcp' entry for it.  deleted]

  • Besides the issues described in my previous comment, in FreeMono and FreeMono

Oblique, 'c2sc' converts U+048E CYRILLIC CAPITAL LETTER ER WITH TICK to
lowercase instead of small caps.
[deleted]

Steve White <Stevan_White>
Group administrator
Tue 11 Jul 2017 07:44:44 PM UTC, comment #11: 

Besides the issues described in my previous comment, in FreeMono and FreeMono Oblique, 'c2sc' converts U+048E CYRILLIC CAPITAL LETTER ER WITH TICK to lowercase instead of small caps.

David Corbett <dscorbett>
Wed 24 May 2017 06:29:55 PM UTC, comment #10: 

In FreeMono, Oogonek is a Latin glyph but it uses a Cyrillic lookup, so the lookup never applies.

In FreeSerif Bold, On_dvojnoj_odnookij becomes sc.on_odinokij.

In FreeSans, the 'smcp' of escyr is sc.c. Therefore, escyr is not a small capital glyph, and it is inappropriate as the result of 'c2sc'.

David Corbett <dscorbett>
Wed 24 May 2017 05:11:23 PM UTC, comment #9: 


> both 'c2sc' lookups from Oogonek in FreeMono instead of just one.

    Yes it was meant to have a decomposition lookup.

> It added yery_oi as the small caps version of Yery_oi in FreeSerif Bold Italic, but yery_oi is not suitable for use as a small caps glyph.

    Yes I got carried away.  I have now deleted that entry.

> There are still some incorrect 'c2sc' substitutions. Specifically, in FreeSerif, Wa should become sc.w;

     Yes fixed

> in FreeSerif Bold, On_odinokij should become sc.on_odinokij;

     Sure.

> and in FreeSans (all), Escyr should become sc.c.

      This one's a toss-up.  In the sans faces, the lowercase es has the form of the uppercase and the size and weight of the lowercase letters, and so qualifies as a small cap.  I just made sure they were all in "invariant" subtables, to make that clear.

Changes in SVN. Thanks!

Steve White <Stevan_White>
Group administrator
Wed 24 May 2017 04:43:05 PM UTC, comment #8: 

Revision 3433 removed both 'c2sc' lookups from Oogonek in FreeMono instead of just one. It added yery_oi as the small caps version of Yery_oi in FreeSerif Bold Italic, but yery_oi is not suitable for use as a small caps glyph.

There are still some incorrect 'c2sc' substitutions. Specifically, in FreeSerif, Wa should become sc.w; in FreeSerif Bold, On_odinokij should become sc.on_odinokij; and in FreeSans (all), Escyr should become sc.c.

David Corbett <dscorbett>
Wed 24 May 2017 04:00:18 PM UTC, comment #7: 

whoops there you are.

Steve White <Stevan_White>
Group administrator
Wed 24 May 2017 01:13:18 PM UTC, comment #6: 

You seem to have forgotten to check in the changes to the other fonts.

David Corbett <dscorbett>
Wed 24 May 2017 10:26:25 AM UTC, comment #5: 

I posted the other faces, and lightly tested them.  Have a look!

Steve White <Stevan_White>
Group administrator
Wed 24 May 2017 07:59:00 AM UTC, comment #4: 

Hi David,

Thanks for the excellent test! 

Yes there are quite a few duplicate entries, some of which are just wrong.  History is, I changed my mind a couple of times as I developed this small caps thing, and sometimes forgot to delete previous ideas.  I was just checking rendered output.

There are several kinds cases. 
1) ones as you mentioned where there is a c2sc mapping from an uppercase glyph to a glyph whose form is decidedly lowercase.  This is just wrong -- even if it is masked by another lookup.
2) ones where the letter is an accented form of another.  At some point I had been converting directly to the smaller letter.  In these, I prefer to decompose the letter into base and acccent, and apply the lookup to the smaller letter.
3) ones of multiple lookups that do the same thing.  That's just messy.

This will take a while to fix, and I want to run rendering tests too.
For now, I've committed an altered but untested version of serif normal.

Steve White <Stevan_White>
Group administrator
Tue 23 May 2017 07:50:09 PM UTC, comment #3: 

Savane is not going to win any prizes for UI design. That command was of course meant to be


gawk 'match($0, /^StartChar: (.*)/, a) { char = a[1]; c2sc = 0 } /2: ".c2sc/ { if (c2sc == 1) { print FILENAME"\t"char } else { c2sc += 1 } }' *.sfd


David Corbett <dscorbett>
Tue 23 May 2017 07:41:52 PM UTC, comment #2: 

FreeSerif maps the Cyrillic capital ⟨Ԝ⟩ to the glyph Wa. It maps the Cyrillic lowercase ⟨ԝ⟩ to the glyph wa. 'smcp' applied to wa produces sc.w. 'c2sc' applied to Wa produces wa. sc.w and wa look similar but not identical. In principle, a glyph which is transformed by 'smcp' should not be the target of a 'c2sc' substitution. Therefore, 'c2sc' should instead map Wa to sc.w.

My other examples of Escyr and On_odinokij are similar: the small caps and lowercase glyphs are similar but not identical so the 'c2sc' lookup needs changing to match 'smcp'.

You can list the other glyphs with questionable 'c2sc' entries thus:

gawk 'match($0, /^StartChar: (.*)/, a) { char = a[1]; c2sc = 0 } /2: ".c2sc/ { if (c2sc == 1) { print FILENAME"\t"char } else { c2sc += 1 } }' *.sfd

That command could in principle have some false positives but I don’t think it actually does.

David Corbett <dscorbett>
Fri 19 May 2017 08:08:32 AM UTC, comment #1: 

Hi David,

Your example shows incorrect behavior for
Ƣ in Sans Oblique and Oblique bold
Ɂ (glottal stop) in Sans Oblique
Ԛ (Cyrillic letter) in Serif normal
These have been addressed in the latest commit.

It also shows
Ԝ (Cyrillic letter) in Serif normal
Ꙩ in Serif Bold
These letters appeared correct in form, to me.  Let me know if I'm mistaken.

I would be glad to see a list of these other questionable enteries. I would remove them, for clarity.

Thanks!

Steve White <Stevan_White>
Group administrator
Thu 18 May 2017 07:46:39 PM UTC, original submission:  

'c2sc' should convert capital glyphs to small caps, but it converts some FreeFont glyphs to lowercase. This is only okay if the lowercase and small caps glyphs are identical, as is often the case in Cyrillic. I found all the glyphs that 'c2sc' converted to a glyph that 'smcp' converted to yet another glyph: see the attached test case. For example, in FreeSans, 'c2sc' converts Escyr to escyr and 'smcp' converts escyr to sc.c, so 'c2sc' ought to convert Escyr to sc.c.

There are other incorrect 'c2sc' lookups besides those in the attachment; e.g. in FreeMono, Psicyr → psicyr → sc.psi. I didn’t list them because they are masked by correct 'c2sc' lookups which happen to apply first. So they are not bugs, though they will become bugs if the lookups are ever reordered.

David Corbett <dscorbett>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #40734:  bad-c2sc.html added by dscorbett (1KiB - text/html)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-24 Stevan_White StatusProceeding Fix posted
    2017-05-19 Stevan_White StatusNone Proceeding
        Assigned toNone Stevan_White
    2017-05-18 dscorbett Attached File- Added bad-c2sc.html, #40734

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code