![]() |
#1 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Implementing small-caps using Open-type features
This new thread follows a former thread about ligatures. This time it is about small-caps (but it could concern also other Open-type features of course).
I suppressed the former post. Quote:
Implementing small-caps I have been using a fork of my font of choice which is Linux Libertine (see joint attachment). I had previously tried to write small-caps, using the CSS property font-variant: small-caps without realizing that I had first to unlock its possibilities (smcp)... ![]() Thus, I had obtained only mixed results (no accented letter) and I had given up. Even with your links, there are different advices on how to implement this (top level, low level,...) I join here the regular font I am using. It seems to work using this code (taken from "Typotheque" above). It needs now testing. It does something with Sigil but nothing the Calibre editor and later with Prince PDF... Code:
font-variant-caps: small-caps; /* high-level property */ -moz-font-feature-settings: 'smcp'; /* low-level (old Firefox) */ -webkit-font-feature-settings: 'smcp'; /* low-level (old Webkit) */ font-feature-settings: 'smcp' on; /* low-level (all new browsers) */ Code:
LinLibertineG30:smcp=1 Last edited by roger64; 03-12-2019 at 12:13 AM. Reason: sigil |
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,636
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Roger, are you working on epub2 or epub3? In epub2 ADE doesn't support "font-variant: small-caps", so forget to implement small-caps by means of CSS. And first you have to embbed the font before using it; did you do it?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
I embed fonts since the dawn of times (nearly) ![]() If you have a look at the nice links given by Tex2002ans, you'll find one Adobe recommendation (but it seems it's more focused on web design than ebook publishing). Adobe recommends this (the name of the class is mine): Code:
.adobe { font-variant-caps: small-caps; -moz-font-feature-settings: "smcp"; -webkit-font-feature-settings: "smcp"; } So they forget the "low-level" property "font-feature-settings" and recommend "font-variant-caps" (not font-variant). Up to now, the only software I found that makes a complete use of the OpenType feature is LibreOffice. So, I tried to export to ePub with LibreOffice an odt using this extra-feature. A pity, the extra OpenType feature which appeared nicely in the odt has not been converted in the ePub.... ![]() |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,636
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
By the way, the font you uploaded is not a small-cap font but a regular one. Below you can check the respective epub with small-caps and the font you want to use. Regards |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
mistake
Last edited by roger64; 03-12-2019 at 09:20 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Please, do analyze my font using this site Select the "features" tab. You'll see that it has indeed some optional features which are "off by default". Among them, using small-caps.(see screenshot). My question is how to use them on an ePub? I am afraid that using font-variant: small-caps does not yield good results. Your ePub does not display smcp characters coming from the font using Sigil ou Calibre. There is a simple way to check if you really use smcp characters coming from the font. Try to write: &. You should get the second character on the left of the screenshot.. (I've put a circle around it) I add a second screenshot, showing a PDF exported from LibreOffice, using characters from this font, and which displays small-caps correctly, and also (see red marks) - standard ligatures (on by default) - old style numerics (off by default) This is the result I am aiming for. Edit: However, after some searching, the informations I've reffered to above seem to be a little ahead of schedule as far as CSS is concerned. The CSS Fonts Module Level 3 properties, font-feature-settings and font-variant-caps (among others) are currently "Candidates au statut de recommandation" (candidates to get a recommended status). Thre reference document is this one.. So, for the time being, it's too early to hope to get any CSS implementation, even if some software like LibreOffice or probably some browsers make already wide use of them. Last edited by roger64; 03-13-2019 at 03:43 AM. Reason: CSS3 |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,636
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Hi Roger,
So, you are not seeking small-caps but how to enable some features on .otf (by the way, the font you uploaded is a .ttf, or not?). It's not possible for now to get what you want, at least, on epub. Nor property "font-variant-caps" nor property "font-feature-settings" will work, except "font-variant-caps: small-caps" (and with any font, not only with .otf with special features embbeded). Give a look to this pages: https://sparanoid.com/lab/opentype-features/ https://sparanoid.com/lab/opentype-features/#c2sc And there also you'll find the names of the .otf fonts that support the features you want, many of them are free. So, you can do your tests with them too. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
![]() Please, do analyze this font using this site You'll get all the information you ask for and more. The links you provide describe exhaustively the OpenType features. However, as I wrote before, on this field, the CSS implementation is lagging. So, the choice today is either we use LibreOffice and produce PDF ebooks with these wanted features (see screenshot above), or we produce ePubs without them and we wait for their implementation. It's a pity because the version of Linux Libertine I use has been published in 2012. LibreOffice maintains an even more typographically advanced version (Linux Libertine G) and seven years later we are still waiting to unleash their full potential on the ePubs. ![]() Last edited by roger64; 03-13-2019 at 10:17 AM. Reason: wakamai |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Small caps | JLius | ePub | 10 | 06-09-2014 01:37 AM |
Kindle and small caps | ricroma | Kindle Formats | 14 | 05-02-2013 04:39 PM |
Small caps | Notjohn | Sigil | 9 | 02-23-2013 10:19 AM |
Small Caps | djulian | Kindle Formats | 2 | 04-05-2012 08:48 AM |
small caps | yuxi_kelly | ePub | 20 | 06-05-2011 12:04 AM |