View Single Post
Old 03-11-2019, 09:00 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
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:
Originally Posted by Tex2002ans View Post

I would highly recommend reading these fantastic articles (they also include fantastic visual comparisons):

Each of them goes through reasons/locations where you might want to include each setting.

This is also another good article showing visual examples of each setting + the CSS to enable each one:

And Mozilla's page on font-feature-settings is more developer-focused (but still fantastic). On the left-hand side, you can see select between different CSS properties you can use (like font-variant-ligatures, font-kerning, [...]).

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) */
On LibreOffice 6.2, I learned also that I just need to define a style (paragraph or character the same) with this font name:
Code:
LinLibertineG30:smcp=1
and small-caps are displayed fine too.
Attached Files
File Type: zip LinLibertineG30-Regular.ttf.zip (411.9 KB, 210 views)

Last edited by roger64; 03-12-2019 at 12:13 AM. Reason: sigil
roger64 is offline   Reply With Quote