Open rastus-vernon opened 7 years ago
@rastus-vernon : could you paste a test case here (text? html?) that I could use for testing?
It's hard to test with HTML unless the fonts are installed on the system, but this LaTeX document can be compiled with XeLaTeX or LuaLaTeX (this assumes the fonts are in the fonts/
subdirectory in the directory the LaTeX document is compiled in):
\documentclass{article}
\usepackage{fontspec}
\newfontface\notosans{NotoSans-Regular}[
Path = fonts/,
Extension = .ttf
]
\newfontface\notosanssups{NotoSans-Regular}[
Path = fonts/,
Extension = .ttf,
VerticalPosition = Superior
]
\newfontface\notosanssubs{NotoSans-Regular}[
Path = fonts/,
Extension = .ttf,
VerticalPosition = Inferior
]
\newfontface\notoserif{NotoSerif-Regular}[
Path = fonts/,
Extension = .ttf
]
\newfontface\notoserifsups{NotoSerif-Regular}[
Path = fonts/,
Extension = .ttf,
VerticalPosition = Superior
]
\newfontface\notoserifsubs{NotoSerif-Regular}[
Path = fonts/,
Extension = .ttf,
VerticalPosition = Inferior
]
\begin{document}
{\notosans A}{\notosanssups abcdefghijklmnopqrstuvwxyz0123456789}{\notosans Z}
\par\vspace{2em}
{\notosans A}{\notosanssubs abcdefghijklmnopqrstuvwxyz0123456789}{\notosans Z}
\par\vspace{2em}
{\notoserif A}{\notoserifsups abcdefghijklmnopqrstuvwxyz0123456789}{\notoserif Z}
\par\vspace{2em}
{\notoserif A}{\notoserifsubs abcdefghijklmnopqrstuvwxyz0123456789}{\notoserif Z}
\end{document}
Result:
@marekjez86, to use OpenType features in HTML/CSS, try font-feature-settings:
<html><body>
<p>Foo <span style='font-feature-settings:"sups"'>Foo</span></p>
</body></html>
Don’t forget the 'ordn' feature.
Might is make sense to align U+00AA FEMININE ORDINAL INDICATOR and U+00BA MASCULINE ORDINAL INDICATOR (and the identical glyphs for “a” and “o” with “ordn” OpenType feature) to the same baseline as “sups” (and the identical glyphs for the modifier letters)? This might be interesing for spanish to have the 3.er (with “sups” feature) and 4.º (with U+00BA MASCULINE ORDINAL INDICATOR) at the same baseline…
Some superscripts and subscripts (OpenType features
sups
andsubs
) are missing for letters in Noto Serif and Noto Sans:This image is for alpha/from-pipeline/unhinted/NotoSerif-Regular.ttf, but the same superscripts and subscripts are missing in Noto Sans Regular.
They are used in various languages, e.g. in French: no, Mme, 1er...
(Not a duplicate of notofonts/latin-greek-cyrillic#295; this is about the OpenType features.)