![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 379
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Font-families and justified alignment
I noticed that there are certain font families that both Sigil and Calibre will render with cut-off text on the right margin if you set text alignment to "justify". Palatino Linotype, for instance. Can anyone explain this behavior, and is there a comprehensive list of fonts that have this rendering problem?
|
![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
Sounds like font hinting issues; maybe have a poke around with FontForge (there's a reasonable mingw build on some .jp site iirc).
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Or maybe fonts with characters that extend beyond their box. But the renderer shouldn't be clipping the characters, unless there's no margin at all or somehow "overflow: hidden" is being applied...
|
![]() |
![]() |
![]() |
#4 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
The use of drop caps on my Sony causes the drop cap to appear, then an entire sentence is shoved off the page at the right leaving only the first letter visible. Invisible is not invisible either, regardless of how many letters, it leaves a 5 or 6 letter blank space, so I think might be onto something Jellby.
|
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 379
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Even with a right margin of 1em, justified Palatino Linotype text wanders off the page at the right margin. There's no overflow css being applied (as far as I can tell).
@Serpentine - I'm afraid I didn't quite follow the meaning of your post... Could you clarify what you meant by "font hinting issues" and by "mingw build" |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
Fonts include hints (there are different types on hints, and different formats of fonts, and some tools that can break or do not support them) as to how they should be placed in relation to other characters, rather than the bounds of the characters themselves which can look somewhat ugly (think monospace). If the container is accidently using these hints to work out wrapping or justification spaces, you will run into situations where parts of the character go over the edge.
FontForge is a very powerful tool for working with fonts, it requires you experiment a little bit - but you should be able to find the options for rebuilding a lot of the data which might be missing or incorrect. It however is not intended to be run on Windows. Mingw/cygwin are two different ways to get Linux code working on Windows. http://www.geocities.jp/meir000/fontforge/ The new build uses cygwin, just extract the file and run the bat file, it will extract and run the tool. |
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 379
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Hmmmm... okay, how would that fix the problem of how Sigil displays fonts like Palatino Linotype? Really, what I'm trying to determine is why Sigil and Calibre are rendering this font in that manner (when it isn't rendered that way by, say, Word), and, based on the "why", whether there are any other fonts that have this display problem.
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
....& I guess the answer is that in most cases they will ignore it / replace it with one of their one.. so is this a genuine issue or a "how many angels on a pinhead" debate ? |
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
If you just want to check the font properties of your fonts, you can also install the MS Font properties extension.
However, since most Linotype fonts hardly ever cause display problems, it's more likely that something is wrong with the Qt rendering engine and/or your html/css. Can you post a short sample html and the stylesheet that you used? |
![]() |
![]() |
![]() |
#10 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You should always check with/on ADE and/or programs using other display engines. BTW (not using your font) but I recently was reading a book on my PEz and one stay line ran off the edge (16pt right margin) in the middle of a paragraph. (and it looked fine in Sigil) I have seen this on occasion, I just live with it ![]() |
|
![]() |
![]() |
![]() |
#11 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 379
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Quote:
I've attached a sample file. While I was creating the sample, I noticed that when there was only a single paragraph in the document, it rendered without problems. Only when further paragraphs were added did the right-margin go to the dogs. Last edited by ElMiko; 07-22-2012 at 04:44 PM. |
|
![]() |
![]() |
![]() |
#12 |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
It doesn't cut off for me (using sigil/calibre in Linux, Palatino font available). The justification looks a bit more ragged than with other fonts, but nothing too out of the ordinary.
Can you post a screenshot of your issue? |
![]() |
![]() |
![]() |
#13 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
First thing,
Neither Windows XP nor Ubuntu 11.10 have (any of) the Palantino font . There is no fallback specified in the stylesheet ![]() EPUBReader handles the justify fine. My comment still stands Sigil and Calibre use the SAME render engine so you should always see the same behavior. |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
I have Palatino Linotype installed on my Windows XP system and your sample epub displays fine with the current stable 32 bit Windows versions of ADE, Calibre and Sigil. What's your system configuration and what Sigil/Calibre versions did you test your epub with? Also check your Qt version by selecting About from Sigil's Help menu.
The only other thing that I noticed that you didn't enclose the font name in quotation marks. IIRC, font names consisting of multiple words should be enclosed by single or double quotation marks and, as theducks has already pointed out, you didn't specify a fallback font. Your stylesheet contains the following line: Code:
font-family: Palatino Linotype; Code:
font-family: "Palatino Linotype", serif; |
![]() |
![]() |
![]() |
#15 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() ![]() 2 sets of eyes are always better ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Left-justified text in a right-justified box | Skeezix | Conversion | 4 | 11-15-2011 08:44 PM |
HTML-EPUB: no justified alignment in iPad (iBooks) | marekl | Calibre | 5 | 01-21-2011 04:37 PM |
Multiple Font Families in one Ebook (K2) | delphidb96 | Amazon Kindle | 1 | 12-13-2009 11:11 PM |
505 vs. different font families in LRF | pepak | Sony Reader | 8 | 09-29-2009 01:03 PM |