View Full Version : Why is Sigil 0.7.1 displaying all text oblique?


Abull
04-02-2013, 07:05 PM
I've just updated to 0.7.1 from 0.6.0, mainly to get the italic text to display in "Book View" when working on epubs with embedded font sets. All the text is displayed oblique, even text that's supposed to be italic is rendered in slanted roman font rather than italic. This is with two different font families, though one doesn't have an italic font.

Correction: Italic text is being displayed in italic font, but it looks like it's rendered oblique in addition.

The epub I first opened was one created by ABBY FineReader from which I'd removed some unused fonts and cleaned with Pretty Print in Sigil 0.6.0. The original epub from FR displays correctly in "Book View" of Sigil 0.7.1 until I delete one of the unused fonts, then all the text displays oblique. All the epubs are displayed correctly in the newest Calibre(0.9.25.0) ebook-viewer.

I should add that this occurs in XP SP3.

Toxaris
04-03-2013, 02:30 AM
Are you sure the font-embedding is done as it should?

Abull
04-03-2013, 03:12 AM
They display correctly before the unused fonts are removed, and in Calibres ebook-viewer both with and without the deleted fonts. Sigil places them in the "Fonts" folder and they are listed in the content.opf. What else could I check to determine if the font-embedding is done properly?

Toxaris
04-03-2013, 05:42 AM
They should be correctly defined in the stylesheet(s). The readers from both Calibre and Sigil are not good judges. If you really want to check whether the embedded fonts work, look on a reader or ADE.

Abull
04-03-2013, 05:50 AM
If I open the original FR produced epub with WinRAR and delete the unused fonts, extract main.css and content.opf and edit them with notepad to remove references to the deleted fonts, and then open the altered epub in Sigil with Pretty Print set to clean on opening, it displays the text correctly without slanting.

If I open the altered epub in Sigil with clean on open turned off and save with cleaning turned on it will still display slanted text for all fonts.

Abull
04-03-2013, 06:00 AM
I don't have ADE, and the only reader I have is a Nokia Nuron with Albite, which only uses it's own font.

Abull
04-03-2013, 06:16 AM
Immediately after saving a copy of main.css from inside Sigil, "book-view" reverted to displaying all the text slanted.

exaltedwombat
04-03-2013, 07:08 AM
I don't have ADE, and the only reader I have is a Nokia Nuron with Albite, which only uses it's own font.

So *GET* ADE! It's a free download, and is your main tool for checking how an epub will display in real life.

It sounds as if there is a problem with the font definitions in your stylesheet. Only the italic variant is being used. If you like to make your epub file available somewhere we'll have a look at it.

As you have discovered, support for fonts on reading devices is patchy, to say the least! Are you sure you REALLY need anything beyond the standard ones? Readers are great for reading. They suck at imitating the layout of a printed page.

theducks
04-03-2013, 09:47 AM
I agree, Something is messed up in the stylesheet.

Yo said you REMOVED the embedded fonts. How?
Deleting the Font files in the Font section is the LAST step.
First step is to adjust the font-family: x,y,z List in the selectors.
Second Place is to remove the corresponding (to the font being removed) @font definition
Last is remove the Font file itself

Leaving the first 2 intact will invoce 'fallback' rules

Abull
04-03-2013, 03:55 PM
So *GET* ADE! It's a free download, and is your main tool for checking how an epub will display in real life.
Didn't know it was free, but I don't have room to spare on my C:/ drive for yet another ever increasing iteration of the required NET framework.

It sounds as if there is a problem with the font definitions in your stylesheet. Only the italic variant is being used. If you like to make your epub file available somewhere we'll have a look at it.
My initial observation was wrong - all the different font styles are being used where specified, it was just hard to see the difference at first glance, with all the text slanted.

As you have discovered, support for fonts on reading devices is patchy, to say the least! Are you sure you REALLY need anything beyond the standard ones? Readers are great for reading. They suck at imitating the layout of a printed page.
I wanted to see how close I could come to the original lay-out with epub.

I agree, Something is messed up in the stylesheet.

Yo said you REMOVED the embedded fonts. How?
Deleting the Font files in the Font section is the LAST step.
First step is to adjust the font-family: x,y,z List in the selectors.
Second Place is to remove the corresponding (to the font being removed) @font definition
Last is remove the Font file itself

Leaving the first 2 intact will invoce 'fallback' rules
I was removing them exactly backwards then, but I don't think that would account for the text going slanty in "Book view" when I saved a copy of the stylesheet of the epub that was hand-edited outside of Sigil.

Tried doing it in the correct order and the text is displayed slanted after the first step of removing the selector and declarations for the unused fonts in the stylesheet.

If I remove the selectors with Tools>Delete Unused Stylesheet Classes..., the text doesn't go slanted till after I delete the @font declarations which are left.

I suspect it's a bug with Sigil and not the stylesheet, but here's the original stylesheet and what's left after using the "Delete Unused Stylesheet Classes" tool. The fonts to be removed are TwCenMT-Condensed and DefaultFont as Arnhem was uninstalled from my system before saving as epub with FR to try to prevent it from being embedded.

theducks
04-03-2013, 04:03 PM
.font2 { font-size:x-small; font-family: 'Futura Condensed Light', fantasy; }

If you delete the Font file ../Fonts/FuturaCondLight-Regularcf06.ttf
the reader can't find the font (family): 'Futura Condensed Light' so it tries a fall back font, in this case a system generic; fantasy

exaltedwombat
04-03-2013, 04:11 PM
Didn't know it was free, but I don't have room to spare on my C:/ drive for yet another ever increasing iteration of the required NET framework.

Make room. If you're making epubs and you care what they look like, you need ADE.

Abull
04-03-2013, 04:27 PM
.font2 { font-size:x-small; font-family: 'Futura Condensed Light', fantasy; }

If you delete the Font file ../Fonts/FuturaCondLight-Regularcf06.ttf
the reader can't find the font (family): 'Futura Condensed Light' so it tries a fall back font, in this case a system generic; fantasy
I haven't deleted that font file or any reference to it and the text still is slanted including that which is displayed using the 'Futura Condensed Light' font.

theducks
04-03-2013, 04:32 PM
I haven't deleted that font file or any reference to it and the text still is slanted including that which is displayed using the 'Futura Condensed Light' font.

did you remove the RED word???

Toxaris
04-03-2013, 04:42 PM
Remove the reference to the stylesheet. See if your problem persist. If not, create a new stylesheet and gradually add stuff from the old stylesheet. You would be able to see where it goes wrong.

Abull
04-03-2013, 04:44 PM
Yes, every instance of ", fantasy" in the stylesheet, edited out, both inside and outside of Sigil and then the text still goes slanted.

meme
04-03-2013, 05:07 PM
What fonts do you have set in Preferences?

Abull
04-03-2013, 05:49 PM
The Sigil defaults, I presume - Arial,Times, and Arial for "Book View" and Arial again for "Special Characters".

Abull
04-03-2013, 06:07 PM
If I save to epub in FR without font embedding, then the text is displayed in the stylesheet specified fonts without slanting in Sigil "Book View" even after I save a copy of the stylesheet. There is a difference in that without the fonts embedded in the epub, text that is designated as small-caps is being displayed in small-caps - that wasn't the case with the fonts embedded. (The small-caps are rendered in normal text with Calibre ebook-viewer.)

exaltedwombat
04-04-2013, 05:35 AM
I wouldn't worry too much about how your book displays in Sigil or Calibre - they are editing tools. How does it perform on a reader program or device? They all have quirks, but if you keep things simple you can write code that displays as intended on most, acceptably on the rest.

Abull
04-05-2013, 10:12 PM
There's no problem with embedded fonts if I substitute different ones in my original and embed them when saving to epub from FR. An epub with embedded fonts from GoogleBooks is problem free in Sigil too, even though it appears to have been created with FR. So I think it's something peculiar about those particular fonts that cause the odd behavior in Sigil "Book View", even though there's no problem in ADE or any other desktop reader with them.

I installed ADE 2.0 on another computer I don't normally use that had room for NETframework, and I found a download link for ADE 1.7 which uses flash and doesn't require NETframework be installed.

exaltedwombat
04-06-2013, 08:52 AM
I suppose an obsolete version of ADE is better than nothing! Are you running a very old/very small computer? This is beginning to sound like you want to work with eBooks but don't really have tools that are up to the job.

Hitch
04-12-2013, 07:31 PM
I suppose an obsolete version of ADE is better than nothing! Are you running a very old/very small computer? This is beginning to sound like you want to work with eBooks but don't really have tools that are up to the job.

Well, what I'm not clear on is where the "slanting" is occurring; in Sigil and Calibre only? I've found neither very good indicators of what will really happen in an actual ePUB.

Vis-a-vis the smallcap comment: Unless there's a small-cap font variant embedded with it, many, many fonts will not work properly as small caps, and the CSS small-cap works almost never at all. And don't even get me started on ligatures, which are a total nightmare.

And in this instance, Wombat is right--using ADE 1.7 won't give you a reliable look at what ePUB readers will now display, you should be using ADE 2.0, or if you can't manage that, try Firefox's free ePUBreader. Or...hell, there are dozens of free e-readers out there that are actual ereaders, not tools like Calibre and Sigil that will help you see what your books will actually look like. If you're going to try to make ePUBs for any consumption other than your own, you'll definitely need the tools.

Hitch

Abull
04-13-2013, 09:52 AM
The slanting only occurs in Sigil, not in Calibre. And only with those particular fonts.

I installed ADE 2.0 on a different PC than I normally like to work at and I'm not seeing a difference from 1.7 in how it displays any epub I've looked at so far. I've disabled the FF epub reader because I found it a nuisance when I only want to download an epub.

The font has a small cap variant embedded; Calibre's ebook viewer is the only thing that will display them. Simulated small caps work in all the viewers.

theducks
04-13-2013, 10:25 AM
I installed ADE 2.0 on a different PC than I normally like to work at and I'm not seeing a difference from 1.7 in how it displays any epub I've looked at so far. I've disabled the FF epub reader because I found it a nuisance when I only want to download an epub.


+1
(and it was a very nice reader. but I tend to mostly download , View occasionally. Maybe the Author will make a preference 'View Only local files' )

Hitch
04-13-2013, 05:39 PM
The slanting only occurs in Sigil, not in Calibre. And only with those particular fonts.

I installed ADE 2.0 on a different PC than I normally like to work at and I'm not seeing a difference from 1.7 in how it displays any epub I've looked at so far. I've disabled the FF epub reader because I found it a nuisance when I only want to download an epub.

The font has a small cap variant embedded; Calibre's ebook viewer is the only thing that will display them. Simulated small caps work in all the viewers.

Yes, many smallcaps will work on the viewers. Most will not work on the actual reading devices.

Honestly, Mods, I think that this thread should be moved to ePUB or Workshop, as it contains a lot of questions and discussion on issues that are unrelated to Sigil itself, e.g., smallcaps, and how fonts should be embedded in stylesheets.

Hitch

JSWolf
04-15-2013, 12:02 PM
If an ePub has enough smallcaps, I embed Charis SIL along with the smallcap version and it looks good because the smallcaps are not simulated. I also use Calibre's font subsetting to make the ePub smaller. Looks nice and is not too big.

Abull
04-20-2013, 06:51 AM
With substitution of otf versions of the original embedded ttf fonts, I'm not having the problem of slanting in Sigil 0.7.1 "Book View".

Now that I have properly working fonts Sigil displays small caps where they're called for. Calibre ebook viewer will display the small caps, but it sometimes when small caps are only indicated for the first line of the first paragraph in a chapter, it uses them for the remainder of the paragraph and subsequent paragraphs. ADE 1.72 and 1.8 use the Roman font lowercase for small cap lowercase. Nook Desktop Reader uses its default font to render small caps as smallcaps, and Sony Desktop Reader does the same.

The odd thing is that when I embed a ttf small cap font with all the other embedded fonts being otf, Nook, Sony and ADE 1.7 & 2.0 use a default font instead of the embedded fonts for all of the text. If the small cap font is also an otf version, then all the embedded fonts are used where they're called for including the small caps.

Although I've not seen any differences in the display of epubs I've looked at with ADE 1.7 and 2.0, I do see that according to reports in this thread on font embedding, some embedded fonts fail to be displayed with ADE 1.72.
http://www.mobileread.com/forums/showthread.php?t=148412
ADE 1.7.2 is using RMSDK 9.1, ADE 1.8 and most of the Nook devices (but not the original) are using RMSDK 9.2 and above. Font rendering was changed drastically between 9.1 and 9.2 (its using a completely separate engine). So it would seem to make sense that this is failing on 9.1 but not on 9.2. You can force RMSDK 9.2 to use the old engine by adding in 'adobe-text-layout: optimizeSpeed;' which may help you with troubleshooting.
So do some readers still use ADE 1.72?

Epub reader for FireFox may display using embedded fonts at first, but renders with default font when scrolling back or forwards across chapters. I have read somewhere that FF epub reader won't display using embedded fonts unless thay are installed on the system, but this doesn't seem to be the case as I've tried viewing it on a PC where the embedded fonts are installed on the system and on one where they aren't installed and I see no difference in the behavior on the two different PCs.

theducks
04-20-2013, 01:57 PM
So do some readers still use ADE 1.72?

Many devices do not / can not get (simple-user installable) updates, so they exist as is.
My PEz is on 2010 (mostly) firmware.

So this will probably also be true for those folk the 'Run them till they drop'