Template talk:Small-caps-ot

From Wikisource
Latest comment: 7 years ago by Billinghurst in topic Not generating small-caps
Jump to navigation Jump to search

Not generating small-caps[edit]

@Artoria2e5: Your template is not creating small-caps for me in the example given. We would normally use {{small-caps}} for the generation, and only when requiring the generation so you may need to better explain the purpose of this template. — billinghurst sDrewth 23:47, 23 May 2016 (UTC)Reply

@Billinghurst: This template only uses the OpenType feature for small-caps generation, so it requires browser support as well as support from the font itself. The reason to write such a template is that current browser (e.g. Chrome) implementations of font-variant: small-caps is mainly based on the CSS2 definition instead of the CSS Fonts L3 Draft definition which explicitly mentions the OpenType feature, along with a complete font feature system, so they end up scaling uppercase fonts.
I personally consider scaled fonts worse-looking than unhandled normal text for non-semantic typographical small-caps usage (e.g. on the first line of a paragraph), so this is what I ended up with. There is a single use of this property in Page:語言自邇集 - Yǔ yán zì ěr jí. A progressive course designed to assist the student of colloquial Chinese Vol 1.djvu/7, where I was using the CSS3 font-variant-caps property with firefox previously and found out that it doesn't work with Chrome. Chrome does understand font feature settings though, so after Special:PermanentLink/6246343 it works for me. Tar-ba-gan must be using Firefox, or how can they miss the formatting issue...
Regarding choice of OTsmcp-capable fonts, my Windows 10 installation of Arial seems to work well with smcp on Chrome 50. FOSS fonts like Source Sans Pro, Liberation Serif and Roboto work too. --Artoria2e5 (talk) 00:15, 24 May 2016 (UTC)Reply
@Artoria2e5: we should be writing our templates for lowest common denominator, not an upper subset, and this has been an agreed approach at enWS. We also look to entail, "keep it simple" as a general philosophy. FWIW I can tell you that the instance didn't work for me with Firefox either, hence my questions and edits. — billinghurst sDrewth 01:48, 24 May 2016 (UTC)Reply
The issue is font-variant-caps which just seems to fail. I still think that {{small-caps}} is working as expected, and wondering what is the issue with the use of that template. — billinghurst sDrewth 01:57, 24 May 2016 (UTC)Reply