LuaLaTeX and XeLaTeX use these tools to render Unicode-encoded input files (LuaLaTeX accepts UTF-8 files, while XeLaTeX is a bit more flexible and also accepts UTF-16 and UTF-32) into PDF documents. Modern font formats such as TrueType and OpenType contain encoding tables which map code points to the glyphs the font file contains.One or more of these code points combines to represent a grapheme cluster or glyph, the shapes within a font that we informally call "characters".A Unicode text file is made of a series of code points, each of which can represent a character to be drawn, an accent or other diacritical mark to combine with an adjacent character, or some non-printing character, such as instruction to print subsequent text right-to-left.Today, text is usually represented in computer systems using Unicode. FuturaSC-Boo for small caps, book weightĭigitising human language is a complicated topic that has evolved significantly since TeX's inception.Continuing to use Futura as an example, say we want to use the "book" weight for our default weight, "demi" for bold, and the font files are named: We might want to hand-pick weights to achieve a certain look or better match the weights of other fonts in our document. Sometimes small caps are stored as separate files as well. However, many typefaces come in more than two weights-some versions of Futura, for example, comes in light, book, medium, demi, bold, and extra bold weights. Given a typefaces's name, fontspec can generally deduce the names of the individual files. A typical typeface might offer four files to represent its normal weight, italics, bold, and bold italics.
See the manual for details, but some basics are covered below.ĭifferent weights and styles of a given typeface are usually stored as separate font files. The fontspec package is extremely configurable.
For example, - can be used to create em dashes (-), quotes can be typed ``like this'' instead of “like this”, and so on. The option allows you to use the standard TeX ligatures mentioned in the Text Formatting chapter instead of Unicode characters that are unlikely to be on your keyboard. Note: Paragraph breaks are not allowed inside the command forms. The following table lists the commands you will need to access typical font shapes. Typefaces usually come in various styles and weights, such as italic and bold. Collaborative Writing of LaTeX Documents.