bugFree UCS Outline Fonts - Bugs: bug #40015, Old style numbers in XeLaTeX

 
 

bug #40015: Old style numbers in XeLaTeX

Submitted by:  Sverre <sverre>
Submitted on:  Thu 12 Sep 2013 06:46:48 PM UTC  
 
Category: overall font problemSeverity: 3 - Normal
Item Group: application-specificStatus: Fix posted
Privacy: PublicAssigned to: Steve White <Stevan_White>
Open/Closed: OpenRelease: 2012-05-03

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 21 May 2014 10:09:46 AM UTC, comment #10:

There are also some issues with kerning. It looks like individual text figures have the same kerning as their lining figures correspondent.

Rosella Capriotti <rosy58>
Fri 13 Sep 2013 10:21:45 AM UTC, comment #9:

Hi,

Let's discuss this off-line. It is inappropriate to re-hash in this bug report an issue that has already been discussed at length elsewhere.

Any software that relies on the glyph naming conventions to function we regard as broken.

Your statement that Adobe Reader uses the glyph naming convention is inaccurate. Some PDF generating software uses such conventions as a clumsy way of filling out tables in PDF files. The tables themselves do not use the glyph names, and it is these tables that A.R. uses. The PDF generating software should use modern standards, including OpenType and Unicode, to fill the tables out.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Fri 13 Sep 2013 10:13:38 AM UTC, comment #8:

With regard to the font version, I can wait until a new version is released.

Now on the glyph naming. The problem isn't really with Adobe Reader. As I understand it, this issue arises with any software that uses the Adobe glyph naming conventions, and as far as I know, the Open Type guidelines recommend those.

XeTeX, for instance, follow these conventions. A pdf produced with XeTeX will therefore have this problem, regardless what software I use to work with the pdf.

As a scholar, all my output will be in pdf. And since I need font features and glyphs beyond the bare minimum you get in LaTeX, XeLaTeX is the solution for me (and others like me).

But to be more constructive, could you refer me to the discussion you people have had about this, so that I can share it with the XeTeX/fonspec developer? It's interesting that you call the Adobe/Open Type approach old-fashioned, because the XeTeX developer calls that the modern and correct usage. Clearly that's a debate for experts, which I am not. So this is why I would like the points you people have raised to be distributed to the XeTeX developer, so that we can find a solution.

Sverre <sverre>
Fri 13 Sep 2013 10:00:45 AM UTC, comment #7:

Hi,

I'm going to say we sorted the immediate problem out.

I can make snapshots of recent builds available to you, if you're intersted.

Regarding the issue with Adobe Reader, you are right in that Acrobat uses the glyph names to reconstruct the text. However, as has been discussed elsewhere (including the FreeFont mailing list) at some length, the use of glyph names to reconstruct text was always a disasterously bad idea, that could never work well and that has never been implemented as it should (by any software, including Acrobat). Unfortunately, a lot of people have glommed on to this mess as the solution.

Much better ways are easily attained in newer software. For example, select the same old-style glyphs in Firefox, and yu will get the original text back. There are several ways this could be implemented embedded-font environments such as Adobe Reader.

I feel that we should not encourage this bug, rather, encourage a modern, correct usage. We should not put old bandages on the wound.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Fri 13 Sep 2013 09:45:08 AM UTC, comment #6:

Interesting, it cut out everything I wrote after the glyphs I copied ... Anyway, you would've seen 10 boxes rather than 0-9. This means that the old style numbers aren't searchable in the pdf or copyable out of the pdf.

Unfortunately, this is an absolute deal breaker for me. It is in fact they only reason I decided to try out FreeFont rather than Linux Libertine, where they have this exact issue. I and the developer of XeTeX and fontspec have been corresponding with the Libertine developers, on the other hand, and they aim to fix the problem.

I'm not an expert on these things, but I suspect this is because these glyphs are not named according to the Open Type guidelines. I.e. they are named old.0 rather than zero.oldstyle etc.

Sverre <sverre>
Fri 13 Sep 2013 09:40:57 AM UTC, comment #5:

1) Right, when I add "Script=Default,Language=Default" to my fontspec options, the output produces old style numbers. When you say "newer versions", you're talking about the beta versions you are working on, right? I have not seen any newer version than the 2012 release.

2) I have only a single copy of FreeFont, so that would be a separate issue.

4) No idea, it works fine for me. Could it be because you have spaces or underscores in your file path? Cf. http://tex.stackexchange.com/questions/63801/use-font-in-xetex-not-installed-on-my-system/63975

So, now that I am able to output old style numbers, my fears came true. If I try to copy and paste the 0-9 sequence out of the pdf, I get

Sverre <sverre>
Fri 13 Sep 2013 09:26:19 AM UTC, comment #4:

Hi Sverre,

I think I see what's going on. It's a combination of several things--let's see if I can sorte it out.

1) There was a problem of the 2012 release of FreeFont, whereby many featues would be activated only for Script=Default,Language=Default.
This is the cause of the warning about 'onum' being available.
I was only relatively recently corrected on this point; newer versions don't have the problem.

2) multiple copies of the font on the system. On my systems, as a result of innocent-looking installs, sometimes old versions of FreeFont get installed. Since I usually think I'm looking at the development version, it causes me a lot of confusion.

3) XeTeX and LuaTeX use different means of finding fonts than does the OS (on Linux anyway). This causes them to behave differently than other apps regarding fonts.

4) I still don't quite understand how to load fonts directly XeLaTeX. I've done it before, but right now it's complaining it can't read the font cmap...

This code now works with the 2012 version (but not loaded directly from the font file)
---------------------------------
\documentclass{article}
\usepackage{fontspec}
\setmainfont{FreeSerif}
\newfontfamily{\old}[
UprightFeatures={Script=Default, Language=Default, Numbers=OldStyle}
]{FreeSerif}
\begin{document}
\old
0123456789
\end{document}

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Fri 13 Sep 2013 09:13:07 AM UTC, comment #3:

Right, I get those exact error messages too. I'm using Windows 7 (texlive 2013). I have no idea what it means that it's either a fontconfig syntax problem or a cache issue. What I'm wondering, of course, is if you guys know how to fix it :)

Sverre <sverre>
Thu 12 Sep 2013 11:28:53 PM UTC, comment #2:

Hi Serre,

I can't edit my own submissions either. Often wish I could.

Next, glyph names have nothing to do with it. The standard you're thinking about has to do with inferring text from the names of glyphs stored in a PDF file, and that is all.
And we ignore the standards about naming glyphs. Their function was a poor work-around that can be done in much better ways now that we have Unicode. There was a big discussion about this on the mailing list earlier this year.

Next, I am glad to report, the development versions of FreeFont have hugely better support for stuff like old style numbers, than does the 2012 version. Unfortunately, I'm very busy and I don't know when I can get the release out.

Now about your XeLaTeX problem.

I have not succeeded in getting it to load the font from a file and find the feature -- it always says the feature is missing.
But with the font properly installed on the system, I have got a similar file to produce old-style figures.

However the same file on another system, with the same font doesn't work:

  • OpenType feature 'Numbers=OldStyle' (+onum) not available for font
  • 'FreeSerif' with script 'Latin' and language 'Default'.

I tried fc-cache -f <dirname> no dice.

Anyway it is either a fontconfig syntax problem or some issue with a cache.

Find the lovely output below.
My sometimes-working file reads
--------------------------------
\documentclass{article}
\usepackage{fontspec}
\setmainfont{FreeSerif}
\newfontfamily{\old}[
UprightFeatures={Numbers=OldStyle}
]{FreeSerif}
\begin{document}
\old
0123456789
\end{document}
--------------------------------

(file #29125)

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Thu 12 Sep 2013 06:49:34 PM UTC, comment #1:

Apparently I can't edit my own submissions here. There's a mistake in the XeLaTeX code in my original post. Add <Numbers = OldStyle> to the \setmainfont{freefont} options. The output is nevertheless the same.

Sverre <sverre>
Thu 12 Sep 2013 06:46:48 PM UTC, original submission:

According to the USAGE file accompanying the FreeFont files, one can get old style numbers with the option 'OldStyle' in the fontspec package used with XeTeX and LuaTeX. This does not, however, give old style numbers:

\documentclass{article}
\usepackage{fontspec}
\setmainfont
[
Path = M:/MyStuff/Fonts/freefont-20120503/,
UprightFont = FreeSerif.otf,
]{freefont}
\begin{document}
0123456789
\end{document}

Could the reason for this be the way the old style numbers are named in the font? I see they are named as old.0, old.1, etc., but shouldn't this according to the standards be zero.oldstyle, one.oldstyle, etc.?

Sverre <sverre>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29125:  oldstyle.pdf added by Stevan_White (3kB - application/force-download)
file #29124:  freefont.png added by sverre (2kB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rosy58 (Posted a comment)
  • -unavailable- added by Stevan_White (Updated the item)
  • -unavailable- added by sverre (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
    Fri 13 Sep 2013 10:00:45 AM UTCStevan_WhiteStatusNeed info=>Fix posted
    Thu 12 Sep 2013 11:28:53 PM UTCStevan_WhiteAttached File-=>Added oldstyle.pdf, #29125
      Item Groupcharacter substitution issue=>application-specific
      StatusNone=>Need info
      Assigned toNone=>Stevan_White
    Thu 12 Sep 2013 06:46:48 PM UTCsverreAttached File-=>Added freefont.png, #29124

    Back to the top


    Powered by Savane 3.1-cleanup