latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

example for Ornament feature #347

Closed mewtant closed 5 years ago

mewtant commented 5 years ago

About §2.8.5 of the manual, Work Sans doesn’t have the most ornamental ornaments, but those which are variations on the bullet work as the manual suggests the feature should. There are a few more ornaments, which can be made to work with RawFeature=+ornm. An example:

\documentclass[17pt]{beamer}
\usepackage{fontspec}
\setsansfont{Work Sans}
\begin{document}
\begin{frame}
  \frametitle{Ornaments in Work Sans}

  • {\addfontfeatures{Ornament=0}•} {\addfontfeatures{Ornament=1}•}
  {\addfontfeatures{Ornament=2}•} {\addfontfeatures{Ornament=3}•}
  {\addfontfeatures{Ornament=4}•} {\addfontfeatures{Ornament=5}•}
  {\addfontfeatures{Ornament=6}•} {\addfontfeatures{Ornament=7}•}
  {\addfontfeatures{Ornament=8}•} {\addfontfeatures{Ornament=9}•}
  {\addfontfeatures{Ornament=10}•} {\addfontfeatures{Ornament=11}•}
  {\addfontfeatures{Ornament=12}•}

  ¶ “ ” ‘ ’ {\addfontfeatures{RawFeature=+ornm}¶ “ ” ‘ ’}
\end{frame}
\end{document}

Work_Sans_ornaments.pdf

wspr commented 5 years ago

Thanks for the suggestion. I'm leaning away from adding more examples to the manual that use fonts that aren't in CTAN. (In fact I'm think of removing more examples and starting a repository entirely based around fontspec examples. What do you think?)

wspr commented 5 years ago

Oh, a quick question — instead of \addfontfeatures{RawFeature=+ornm} can you just write \addfontfeatures{Ornament} ?

mewtant commented 5 years ago

Yes, \addfontfeatures{Ornament} works and is easier to write; I must have been in need of caffeine when I first tried this font!

A repository of examples would be useful (I have my own tiny repository of examples fixing commercial fonts with \directlua). But my inclination would be to keep a rich variety of examples in the manual, because they attract the eye and help keep a reader motivated to work through the manual. It was examples of Zapfino that first made me look into fontspec; Zapfino isn’t among the fonts for which I’ve purchased a license, because it wouldn’t suit the kind of text I work on, but the examples enabled me to imagine what I could do with other typefaces.

wspr commented 5 years ago

That repository is great! Do you mind if I link to it in the fontspec manual? (I.e., do you think you'll keep it around for the foreseeable future?)

mewtant commented 5 years ago

Glad you find it useful, and certainly you may link to it. It’s not going anywhere, because I need it myself so that I don’t have to figure things out again from scratch each time I use a typeface. I’ll add to it little by little as I have time and find solutions.