10-14-2012, 03:39 AM | #16 | |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
|
|
10-14-2012, 09:06 AM | #17 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
10-14-2012, 12:21 PM | #18 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Could you give an example? How to assess exactly the height of lowercase letters? (real smallcpas and fake ones). Is this something other than the font-size? If we select fonts from the same family, can we be confident that the same percentage (or em?) will apply for both?* Shall we use em preferably than %? * Except your example above. Last edited by roger64; 10-14-2012 at 12:24 PM. |
|
10-14-2012, 01:24 PM | #19 | |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
That's without a doubt
Quote:
The huge problem is probably: You have: <p><span class="LinLibSC">Text to transform into Fake-Caps</span></p> You need: <p>T<span class="fc">EXT</span> <span class="fc">TO</span> <span class="fc">TRANSFORM</span> <span class="fc">INTO</span> F<span class="fc">AKE</span>-C<span class="fc">APS</span></p> Actually I don't know how to transform that with regex etc. |
|
10-14-2012, 01:56 PM | #20 | ||
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
But for lowercase letters, every font has a different look and proportion. The only good way of getting the right size for smallcaps is by visual judgement, and you can't know which font the book will be read with! Quote:
About using em or %, they're equivalent, I believe. I guess you could use "font-size: 1ex" (the ex unit is supposed to be approximately the height of lowercase letters), but I don't think it is correctly defined in most fonts, and I wouldn't rely on it being correctly used by rendering engines... I haven't really tried it, though. |
||
10-14-2012, 05:23 PM | #21 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks for these explanations. I am sometimes facing practical problems like this one:
This is the printed text, using smallcaps: screenshot smallcap on the left. We can see that capitals have the height of lowercase letters. This is the copy made with fake caps: screenshot fake which uses a simple code which looks clean, but it's not smallcaps and it's not quite right: Code:
<p class="Corpspetit">LE MUSÉE NOIR <i>(Robert Laffont, 1946).</i></p> I wonder how to write it with smallcaps.... Either the italics are too small or too big. I need a paragraph to wrap the line of code and inside a span for the smallcap. For smallcaps I usually write in the span the font-family. Should I also add a font-size:0.75em? Last edited by roger64; 10-14-2012 at 05:55 PM. |
10-14-2012, 05:36 PM | #22 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
mistake
|
10-14-2012, 05:47 PM | #23 |
Resident Curmudgeon
Posts: 73,668
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is smallcaps a percecnt of the capitol or is that again based on the font in use?
|
10-15-2012, 01:07 AM | #24 | |
Addict
Posts: 239
Karma: 1280000
Join Date: Oct 2010
Location: USA
Device: None
|
Quote:
X-height is a font metric, one of many, that is inside every opentype font file. It can't be a % of cap height since the ratio x-height/cap-height varies. Modern fonts for screen use typically have larger design for x-height than traditional print typefaces (e.g. Georgia or Verdana v. Times Roman), in an effort to increase readability. Cap height is not necessarily the same as the value for 1em, either. An em also includes lower case ascenders (usually higher than caps), descenders, and maybe more space, so that if tight line spacing is acceptable, no leading is needed. "Em" used to be a horizontal measurement - the width of a capital M. But that's usually pretty square anyway, and now it's used for vertical height. Anyway, that's where "em dash" (and "en dash") comes from: a dash the width of the letter. Even if one gets caps set to x-height, the text will still not look right. They will be too light/thin, and the spacing will be off. I haven't experimented, but a bold at 0.4-0.6 em might look closer to right than a regular weight - a semi-bold probably will. You really need the smallcap glyphs, either from a separate font file or, preferably, as a feature in the original font. Last edited by derangedhermit; 10-15-2012 at 01:12 AM. |
|
10-15-2012, 01:31 AM | #25 |
Addict
Posts: 239
Karma: 1280000
Join Date: Oct 2010
Location: USA
Device: None
|
|
10-15-2012, 01:45 AM | #26 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Thanks a lot for stressing clearly these main points and commenting them. So, as far as height is concerned, we have better check visually after every font change. It seems that, finally, after losing some time on it, I got some acceptable results for fake and true smallcaps. To put them on equal footing, I choose a 92% font-size for the paragraph and then - uppercase with 0.75em for the fake ('Serif' font) - lowercase for the true ('Linux Libertine') These values above could be further tweaked but I dare not. From left to right: fake, true, printed. Last edited by roger64; 10-15-2012 at 01:48 AM. |
|
10-15-2012, 04:39 AM | #27 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
While faked smallcaps look "wrong" generally (because they are too thin), they have a couple of advantages:
- It's easy to have them in different styles (italic, bold), while true smallcaps are often not available in some of them. - They can look better when combined in with numbers (as in acronyms like P2P or B3LYP), although some true smallcaps may have matching numbers too. But they also have another disadvantage: - The markup is hideous, even more so if you want to be careful with the spaces (note that the spacing is the "fake" example is too tight), because these are not equivalent: Code:
<span class="smallcap">TWO WORDS</span> <span class="smallcap">TWO</span> <span class="smallcap">WORDS</span> |
10-15-2012, 09:09 AM | #28 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
And now I understand why my converter uses separate spans (like in your previous second example), and also separate figures, while, to make the code look cleaner, I bundle all these separate spans into one... I was thinking it was a mistake. ;-) Last edited by roger64; 10-15-2012 at 09:21 AM. |
|
10-15-2012, 11:45 AM | #29 | |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<span style="font-size:20%">THIS IS A TEST</span> <span style="font-size:20%">THIS</span> <span style="font-size:20%">IS</span> <span style="font-size:20%">A</span> <span style="font-size:20%">TEST</span> |
|
10-15-2012, 11:56 AM | #30 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ePub->ePub conversion with obfuscated fonts | DiapDealer | Conversion | 1 | 03-17-2012 02:33 PM |
Foreign fonts (PL) in epub | tntmarek | Interead COOL-ER | 1 | 03-04-2011 06:05 PM |
ePub embedded fonts | JSWolf | Ectaco jetBook | 9 | 09-14-2009 08:43 PM |
Epub & fonts | Nate the great | ePub | 8 | 07-28-2009 06:13 AM |
ePub + Embedded Fonts | Cygfrydd | ePub | 11 | 03-02-2009 05:56 PM |