View Full Version : Narrow No-Break Space and commercial support.


roger64
08-30-2012, 01:19 PM
Hi

Looking for explanation. :bookworm:

Now OpenOffice and LibreOffice insert automatically the   (non-breaking space) if the user selects this option. Many French use this option.

The narrow no-break space is   http://www.fileformat.info/info/unicode/char/202f/index.htm
Its use is considered to be best according to French typographic rules. If so, it should replace the   at least for some punctuation signs. French call it: espace fine insécable.

In xhtml files, it is easy to insert the &# 8239; and to replace the  , using for example Sigil. However, ADE flags it with a question mark and so, it hinders its use for EPUBs and mobile readers.

To sum it up: Whatever may be the font I use, I can insert &# 8239;
However, I may face display problems (with ADE for example).

But.... some commercial fonts are said to offer thin no-break space support. It seems to be done in a different way because, if you use these fonts, you can display them on EPUBs and ADE will not protest.

Could somebody tell me if the sentence above is right, and if so, explain how do they perform this kind of miracle?

Jellby
08-31-2012, 04:18 AM
I think it depends on the ADE version, and it might depend on other settings.

See here (http://wiki.mobileread.com/wiki/EPub_Reader_Test), on the Orizon:

Spaces: Em-space, thin space, narrow no-break space displayed as question marks, others apparently behave properly. With hyphenation enabled all spaces are supported.

It looks like enabling hyphenation uses a different renderer version (1.8-like instead of 1.7-like?)

roger64
08-31-2012, 04:58 AM
Hi

Thanks for these informations I did not have because I did not succeed yet to make the new ADE version work with Wine. I nevertheless suspect there could be something else. The best is to provide an example.

Take this high-quality French ebook (a pity the author is no more active on this forum): Le roi au masque d'or.
http://efele.net/ebooks/livres/000163/index.html

If you download the full EPUB version (the one including I think Caslon fonts) and if you look at it with ADE 1.7 ("old" version) you clearly see that it make uses of thin no-break space (for example before ; : ! ?) and ADE does not flag them with a question mark. contrary to what it does to &# 8239;

But, open now this EPUB with Sigil 0.53. It will flag these same thin no-break spaces in Book view with a crossed rectangle (see Attachment) and ignore them in Code view.

It seems the book uses a different entity than &# 8239: to represent thin no-break space. If this is so, I would prefer to use it instead of &# 8239; because I would have ADE compatibility.

Jellby
08-31-2012, 05:41 AM
Thanks for finding a case where it works, it made me investigate a bit deeper... and my conclusion is that the thin no-break space works if it is defined in the font. My default font is Minion Pro Caption, and I thought it included the thin space, but it does not. (ADE 1.8 seems to perform character substitution when the font does not have the right one, that's why it works fine in the Orizon with hyphenation enabled).

So, I've made a test. I've modified Minion Pro Caption (already with several kerning modifications) to include the #8239 character, embedded it in a French book, and it works nicely in ADE 1.7 (under Wine). The font in the Éfélé book is weird, it's probably a subset, but FontForge does not open it correctly (the characters don't match their names).

To add the #8239 character, just open your font in FontForge, select the space character (#32, before the !), copy it (Ctrl+C), go to #8239 (View -> Go to, write 8239), paste (Ctrl+V), double-click the character and drag the vertical line somewhat to the left, to make the space narrower. I believe the non-breaking property is implicit, but maybe something else should be done.

roger64
08-31-2012, 12:07 PM
So, I've made a test. I've modified Minion Pro Caption (already with several kerning modifications) to include the #8239 character, embedded it in a French book, and it works nicely in ADE 1.7 (under Wine).

This is really great news!!

The font in the Éfélé book is weird, it's probably a subset, but FontForge does not open it correctly (the characters don't match their names).

I think Éric Muller uses a subset built on demand according to the glyphs used in the book.The fonts are also probably obfuscated.

To add the #8239 character, just open your font in FontForge, select the space character (#32, before the !), copy it (Ctrl+C), go to #8239 (View -> Go to, write 8239), paste (Ctrl+V), double-click the character and drag the vertical line somewhat to the left, to make the space narrower. I believe the non-breaking property is implicit, but maybe something else should be done.


I MUST learn it. As you can imagine, I will be very busy these days...
Maybe you can expect some messages... :D

JSWolf
08-31-2012, 07:56 PM
Speaking of subsets, is there a way (in Windows) to subset a font based on what's in the ePub?

Toxaris
09-04-2012, 12:11 AM
Of course. Load the font into fontforge and select only the characters you need.

There are several programs/scripts that can show all characters used in a file.

JSWolf
09-04-2012, 12:39 PM
Of course. Load the font into fontforge and select only the characters you need.

There are several programs/scripts that can show all characters used in a file.

Can you please point me to such scripts? Thanks.

Toxaris
09-04-2012, 01:08 PM
I know that I searched with Google when I was looking for methods for the Word macro that does this. It came up with several hits, depending on your programming language... Most of the methods are slow...

I ended up using a different method, which is possible since my source is Word. I save it as pdf within Word (as of 2007 it is a standard functionality). I open the PDF in fontforge and select the font I want. I don't know if it is intended, but the PDF already contains a subset of the font with only the used characters. So, save the font in FontForge as either ttf or otf and you have a subset of the font.