View Full Version : Scenebreak with font change


opitzs
11-06-2010, 05:17 PM
Hi,

I am working on an epub and I try to use the Nymphette Font (http://www.dafont.com/nymphette.font) for scene breaks:

.scene_break {
font-family: "Nymphette";
font-size: 2em;
display: block;
margin-bottom: 0.5em;
margin-left: 0em;
margin-right: 0em;
margin-top: 0em;
text-align: center;
text-indent: 0em;
}

<p class="scene_break">7</p>


It shows a nice symbol in Sigil, but ADE and my PRS 600 simply display the text in the standard font.

Do you have any hints?

Thank you
Sven

Adjust
11-06-2010, 07:59 PM
What I do is take a screen shot of the dinkus then insert it as an image. Because font embedding is really hit and miss

HarryT
11-07-2010, 04:44 AM
What I do is take a screen shot of the dinkus then insert it as an image. Because font embedding is really hit and miss

I agree. Using a graphic for this kind of thing is a much more portable solution.

Jellby
11-07-2010, 05:08 AM
Are you embedding the font in the ePUB?

Fabe
11-07-2010, 09:27 AM
I have yet to find a universal ePub display. Each reader has its own quarks and limitations. Embedded fonts are a tossup. Some machines/ereaders display them, others like the iPad will not. The more machines you want your epub to run on, the more generic the coding must be. At least that's my observation.

yekim54
11-07-2010, 07:52 PM
Each reader has its own quarks and limitations.

And those quarks combine to form hadrons.

opitzs
11-08-2010, 05:36 AM
Hello All!

Thank you very much for your help, I will do as you suggest and make a dinkus picture, which I will then use. I was just astounded, as all other Fonts worked absolutely well...

In this case this is not a problem at all, it is just one of my favourite books and I want a version that does it justice, even if I can't give the result to anyone else. So I won't have to look after IPad compatibility.

Thank you very much
Sven

Jellby
11-08-2010, 06:09 AM
Note, too, the following sentence from the ePUB specification:

Fonts must not provide mappings for Unicode characters that would change the semantics of the text (e.g. mapping the letter "A" to a biohazard symbol).

or, in your case: mapping the number "7" to a dingbat. Maybe that's why this font doesn't work?

opitzs
11-08-2010, 08:51 AM
@Jellby:

I see what you mean, but how would the browser component know, that in this case this is a meaningless substitution?
Or can that be found out through some font properties? When I have time I will investigate this.

Thank you
Sven

jharker
11-08-2010, 04:12 PM
I've pointed this out before, but I'll say it again: yes, you CAN embed fonts for the iPad. See my blog post (http://bergenstreetpaperco.blogspot.com/2010/09/fulltext-embedded-fonts-in-epub-for.html) for the general how-to.

Now, just because it's possible doesn't mean you SHOULD do it. As everyone has pointed out, embedding support in different readers can be hit-or-miss (although I believe the method I posted should work in most cases). Also, it shouldn't be used for full text. For headings, such as you propose, I think it would be fine.

Still, images are generally the most portable solution. I would recommend creating the image at high resolution and giving its size in em; that way it should scale along with the font, and even if it gets big you won't see any pixelation.

opitzs
11-10-2010, 05:35 AM
@jharker:
Thank you, I was not sure if I could scale an image in em, this is very nice!

opitzs
11-13-2010, 07:14 AM
Hi all,

I have installed fontforge on my machine and it turns out, that there are Symbol-TTFs and normal TTFs. After converting the font to a normal TTF, it now simply works like a charm!

So, maybe this is the problem, why some fonts show and some don't?

Ciao
Sven

JohnLemon
03-20-2011, 02:18 PM
Thank you all for this discussion. Using an image file in place of a dingbat will save my own "question mark" problem. A most excellent idea and a very elegant solution!

Thanks again,
-John

ldolse
03-21-2011, 07:54 AM
If you want the same level of quality as the original font you can also use Inkscape (http://www.inkscape.org/) to convert the desired scenebreak character to an svg. This way you get something that's scalable to any resolution and future-proofed.

Down-side is crappy epub renderers don't render SVG, but I'd rather use the features and force the non-compliant reading system guys to step up to the plate and support the spec. Any ADE/Apple/Webkit based renderers support it though.

Adjust
03-21-2011, 06:29 PM
Down-side is crappy epub renderers don't render SVG, but I'd rather use the features and force the non-compliant reading system guys to step up to the plate and support the spec. Any ADE/Apple/Webkit based renderers support it though.

Do you really think just because you've put in an SVG image then the non compliant readers will say "Hang on...I think we should add support for SVG"???

All you are doing is making an eBook which won't display correctly.

ldolse
03-21-2011, 11:49 PM
I'm not the only epub creator that uses SVG in epubs. I certainly don't think because I put SVG images in my own epubs I'm personally going to have any effect on non-compliant reading systems. However, if epub authors use features in the spec like SVG, users will aggregate toward reading systems which support those features - in this case ones which display the images. Non-compliant systems will need to either support the features or lose their user base over time.

There are things an author can do to work around things in non-compliant systems like using alt text or <object> tabs, but support for those workarounds are spotty.

The most popular reading systems are all compliant btw, last I checked the ones not supporting SVG are Stanza, Aldiko, and the Firefox EpubReader plugin. Stanza is already losing it's userbase since the Amazon acquisition and launch of iBooks. On the Android side I'd love to see Aldiko start supporting SVG. Working around non-compliant systems problems by not using SVG is definitely not going to help make those reading systems more compliant, it's just going to allow them to continue to be mediocre....

It's not like I'm arguing for the use of obscure epub features which all of the reading systems have implemented poorly, SVG is very useful and well implemented across most systems.

Edit: can't recall for certain whether or not Aldiko supports SVG.

Adjust
03-22-2011, 12:38 AM
I'm not the only epub creator that uses SVG in epubs. I certainly don't think because I put SVG images in my own epubs I'm personally going to have any effect on non-compliant reading systems. However, if epub authors use features in the spec like SVG, users will aggregate toward reading systems which support those features - in this case ones which display the images.

No they won't because unless they buy the Paperback edition they will have no idea that there was suppose to be images in the first place.

BTW-- try converting your ePub with SVG images to .mobi via Kindlegen to be sold on Amazon's kindle.