Add extra characters to FreeSerif

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Add extra characters to FreeSerif

4fingers

Hi,

This is my first time using FreeSerif and Fontforge and I noticed the following two glyphs are not available:
Glyph "Z" (0x2124)
Glyph "R" (0x211d)

I have managed to build and install FontForge but I am unsure of the process of asking for extra characters to be included.
If I were to draw the glyphs then I could follow the following guide:
http://fontforge.sourceforge.net/editexample.html#CharCreate

Should I take a screen shot of how Arial Unicode MS renders the two glyphs and use that as my background layer?

If I do manage to draw them correctly will they then be included in the distribution?

Thanks



     
Reply | Threaded
Open this post in threaded view
|

Re: Add extra characters to FreeSerif

Steve White-9
Hi, Graeme!

On Fri, Feb 25, 2011 at 8:06 PM, Graeme Kidd <[hidden email]> wrote:
>
> This is my first time using FreeSerif and Fontforge and I noticed the following two glyphs are not available:
> Glyph "Z" (0x2124)
> Glyph "R" (0x211d)
>
Are we understanding one another?

These characters (0x2124 and 0x211d, the "blackboard bold" letters Z
and R) have been in the roman styles of FreeSerif, FreeSans, and
FreeMono for some time.

Do you have a recent version of the package? Find them at
    http://ftp.gnu.org/gnu/freefont/
The last release is marked 20100919 -- this is what we're working from.

Or... do you mean in the *bold* and *bold italic* styles?
 I see these characters are missing in those styles.

> I have managed to build and install FontForge but I am unsure of the process of asking for extra characters to be included.
>
This will do.  You could also make a request on the bugs page
   https://savannah.gnu.org/bugs/?group=freefont
If you make it using a savannah account, you'll be mailed of updates
to the report.

> If I were to draw the glyphs then I could follow the following guide:
> http://fontforge.sourceforge.net/editexample.html#CharCreate
>
> Should I take a screen shot of how Arial Unicode MS renders the two glyphs and use that as my background layer?
>
Please *do not* copy anything from non-free copyrighted material.
It cannot be accepted.

Besides, who said some other person knows the best way to draw a character?

> If I do manage to draw them correctly will they then be included in the distribution?
>
Your submissions (provided they are your personal work) will be gladly
considered.

We're pretty picky though.

In this case, I would suggest starting with existing glyphs in the
face (R and Z), and look
at how the blackboard bold is implemented in the roman face, and try
to make your
glyphs so they fit in with the others.  Consistency is very important here.

When you're done, please send me a "diff -u" of your SFD file vs the original.

I'd be happy to see what you come up with!

Reply | Threaded
Open this post in threaded view
|

Re: Add extra characters to FreeSerif

Steve White-9
Hi Graeme,

Some ideas below:

On Fri, Feb 25, 2011 at 10:59 PM, Graeme Kidd <[hidden email]> wrote:

>
>
> ----------------------------------------
>> Date: Fri, 25 Feb 2011 20:47:47 +0100
>> Subject: Re: [Freefont-bugs] Add extra characters to FreeSerif
>> From: [hidden email]
>> To: [hidden email]
>> CC: [hidden email]
>>
>> Hi, Graeme!
>>
>> On Fri, Feb 25, 2011 at 8:06 PM, Graeme Kidd  wrote:
>> >
>> > This is my first time using FreeSerif and Fontforge and I noticed the following two glyphs are not available:
>> > Glyph "Z" (0x2124)
>> > Glyph "R" (0x211d)
>> >
>> Are we understanding one another?
>>
>> These characters (0x2124 and 0x211d, the "blackboard bold" letters Z
>> and R) have been in the roman styles of FreeSerif, FreeSans, and
>> FreeMono for some time.
> Ah, well it appears Apache FOP is not picking them up:
> [WARN ] Glyph "ℤ" (0x2124) not available in font "FreeSerif".
> [WARN ] Glyph "ℝ" (0x211d) not available in font "FreeSerif".
>
> I am using Apache FOP to help convert XML to Postscript which only supports Type 1 fonts. So far I have simply generated a PFM and PFB file from the FreeSerif.sfd file which is then used by Apache FOP.
>
> Once I get it working I will let you know if I need bold or italic versions.
>
It is very likely that something is not picking up on the new fonts.
I don't know how Apache FOP works, however.

How did you install them?  (and which versions?  TrueType, OpenType?)
What system are you using?

Some things to check out:

Previously-installed freefont:
     look under /usr/share/fonts/
     do a "locate freeserif" and "locate FreeSerif"

Font cache not properly updated.
    delete everything under ~/.fontconfig/

Good luck!

Reply | Threaded
Open this post in threaded view
|

Re: Add extra characters to FreeSerif

Steve White-9
Hi Graeme,

The plot thickens!  See below.

On Sat, Feb 26, 2011 at 3:42 AM, Graeme Kidd <[hidden email]> wrote:

>
>
> ----------------------------------------
>> Date: Sat, 26 Feb 2011 00:56:37 +0100
>> Subject: Re: [Freefont-bugs] Add extra characters to FreeSerif
>> From: [hidden email]
>> To: [hidden email]
>> CC: [hidden email]
>>
>> Hi Graeme,
>>
>> Some ideas below:
>
> Thanks for the tips but I am on a Windows Vista machine (Frontforge compiled via cygwin), but before I go debugging it further can I just confirm that "ℤ" (0x2124) and "ℝ" (0x211d) do exist. Looking through the FreeSerif glyphs I found two group of blackboard bold letters. The first were in uppercase A (6644 0x19f4 Abb) to G (6649 0x19f9 Gbb), I (6650 0x19fa Ibb) to O (6655 0x19ff Obb) and S (6656 0x1a00 Sbb) to Y (6662 0x1a06 Ybb). The second were in lowercase and went from a (6663 0x1a07 abb) to z (6688 0x1a20 zbb).
>
> Should I not expect to see the R between O and S and the Z after Y? I can also confirm that I am using the 20100919 file.
>
Regarding Vista, it is also possible for different installations of
one font to get tangled up.  I have seen it happen.  If you go to a
DOS prompt and navigate to the system fonts directory, sometimes you
will see ghost versions of previously installed fonts.  I recall there
was no obvious way to clean them out, and I had to do something
sneaky.

Just what are you seeing that appears wrong?  (What are you looking at
in what application program, and what do you expect to see?)

Regarding the curious distribution of the blackboard bold letters: you
are seeing an effect of the uncertain development of Unicode.

The "ℤ" (0x2124) and "ℝ" (0x211d)  in question are in the Unicode range
    Letterlike Symbols
    http://www.unicode.org/charts/PDF/U2100.pdf
The other blackboard bold symbols are from the monster range
    Mathematical Alphanumeric Symbols
    http://www.unicode.org/charts/PDF/U1D400.pdf

Historically, the Letterlike Symbols range appeared first, as a rather
haphazard collection of often-appearing symbols, the  R and Z being
very commonly used in math to represent the algebras of the real
numbers and the integers [German: Zahl], respectively.  Later, they
decided, what the heck, let's add whole ranges of these styled
characters.  But they have some policy not to repeat a letter, so
there are holes in the mathematical blackboard bold range that serve
specifically as placeholders for the previously-defined symbols.

Unfortunately the decision to add whole ranges of styled letters
played conceptual havoc with Unicode users.  Originally, Unicode was
meant to encode symbols of differing *semantic* values, and
specifically *not* differing *styles*.  This latter range seems to
consist of ranges of styles of the Latin alphabet, which have no
particular semantic meaning.  Well OK you could say they can hold
arbitrary but different semantic meaning in math text.  Anyway, the
problem is, I have a font which has a roman, italic, and bold style.
Inside the roman style, this range holds bold and italic versions of
the same face.  Now... what goes in the same place of the bold version
of the font?  A *more* bold style of the bold and italic symbols? What
happens in my bold-italic style?  is the bold-italic range bolder and
italicer?  I guess so.  What a mess.

The answer to your question is: No. In accordance with the Unicode
standard, the blackboard bold R and Z are in Letterlike Symbols, and
there are holes in the Mathematical Alphanumeric Symbols where you
would expect to find those styled letters.

Cheers!

Reply | Threaded
Open this post in threaded view
|

RE: Add extra characters to FreeSerif

4fingers


----------------------------------------
> Date: Sat, 26 Feb 2011 09:32:35 +0100
> Subject: Re: [Freefont-bugs] Add extra characters to FreeSerif
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]

> The answer to your question is: No. In accordance with the Unicode
> standard, the blackboard bold R and Z are in Letterlike Symbols, and
> there are holes in the Mathematical Alphanumeric Symbols where you
> would expect to find those styled letters.

Wow thanks for taking time to give a very helpful explanation, looking back into the SFD file and I can now see the blackboard bold R and Z letters.

There are three ways you can configure FOP to use custom fonts. One is to simply let it detect the fonts installed on your system, the second is to specify a folder where the fonts are held, and finally you can specify them individually.

I have configured it so it looks into a specific directory e.g. "C:\FOP_Fonts". This folder then contains a "FreeSerif.afm" and "FreeSerif.pfb" file created via the "Generate Font" menu in Fontforge. As a test I created the following FO file which was taken from a simple “Hello World” example [1] with the simple addition of some extra characters and a font-family.


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
        font-family="FreeSerif" font-weight="normal" font-style="normal">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
      <fo:region-body margin="1in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>

  <fo:page-sequence master-reference="my-page">
    <fo:flow flow-name="xsl-region-body">
      <fo:block font-family="FreeSerif" font-weight="normal" font-style="normal">
              Lj lj    NJ    Nj    nj    Ǎ    ǎ    Ǐ    ǐ    Ǒ
      ǒ    Ǔ    ǔ    Ǖ    ǖ    Ǘ    ǘ    Ǚ    ǚ    Ǜ    ǜ    ǝ    Ǟ
      ǟ    Ǡ    ǡ    Ǣ    ǣ    Ǥ    ǥ    Ǧ    ǧ    Ǩ ℤ
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

When this is processed by FOP it generates a warning for the blackboard bold R letter:
[WARN ] Glyph "Z" (0x2124) not available in font "FreeSerif".

Since the FreeSerif font is embedded in the PostScript file I can run it through Adobe Distiller and get a PDF which contains the following:
"Lj lj NJ Nj nj Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ Ǖ ǖ Ǘ ǘ Ǚ ǚ Ǜ ǜ ǝ Ǟ ǟ Ǡ ǡ Ǣ ǣ Ǥ ǥ Ǧ ǧ Ǩ #"

As you can see it managed to produce all the characters except for the blackboard bold Z which has been substituted by a hash. This seems to suggest it can find the FreeSerif font but the exported font doesn’t contain the blackboard bold Z letter.

After viewing the font in another Font Manager (Fontforge is installed on another computer) I noticed the character map only contained 2,715 glyphs. This is a major reduction which might suggest I or Fontforge exported the font wrongly.

I can attach the afm and pfb files but any idea what could have gone wrong?

Thanks

[1] http://www.renderx.com/tutorial.html

     
Reply | Threaded
Open this post in threaded view
|

RE: Add extra characters to FreeSerif

4fingers


> After viewing the font in another Font Manager (Fontforge is installed on another computer) I noticed the character map only contained 2,715 glyphs. This is a major reduction which might suggest I or Fontforge exported the font wrongly.

Sorry I should try and do more research before I hit reply but it appears the font is fine. Running t1testpage (http://www.lcdf.org/type/t1testpage.1.html) on the PFB file shows that it does indeed contain all the correct glyphs:
t1testpage FreeSerif.pfb -o FreeSerifTest.ps

After converting FreeSerifTest.ps to a PDF file I was able to search for Zbb which found the glyph no problem.

Sorry for the confusion but I’ll head over to FOP to see why it’s not picking it up.

Thanks


     
Reply | Threaded
Open this post in threaded view
|

Re: Add extra characters to FreeSerif

Steve White-9
Hi Graeme,

I'm familiar with various issues that arise from attempting to use the
Adobe Glyph List on modern encoded fonts.

My view is, it is simply wrong to try to look up a character by name
in a font that has a standard encoding.  If a standard encoding is
specified, the encoding should be the *only* way characters should be
looked up in the font--that is its purpose.

Before Unicode, the AGL provided a sort of work-around for the absence
of a standard encoding,
but that time is long gone.  The glyph names in a font with a standard
encoding should now be viewed as simply an aid for humans.

So, I would say this FOP is buggy in this regard.

I'm CCing the FreeFont-bugs list for closure on the subject.

Thanks for your input!

On Wed, Mar 2, 2011 at 1:58 PM, Graeme Kidd <[hidden email]> wrote:

>
>
>> Please keep me posted on what you find.
>
> It turns out Apache FOP needed the Glyph name in the AFM file to also be the Unicode sequence. So when it came to the Z letter like glyph it couldn't convert "Zbb" to its Unicode value:
> C -1 ; WX 659 ; N Zbb ; B 26 0 608 656 ;
>
> To get round this issue I simply exported the font again but this time ensuring "Force glyphs names to" was set to "Adobe Glyph List". This then resulted in the Unicode sequence being present in the glyph name:
> C -1 ; WX 659 ; N uni2124 ; B 26 0 608 656 ;
>
> The font now works as expect in Apache FOP :)
>
> Thanks again, not just for you help in solving this issue but also for creating a great Unicode font.
> Graeme
>