### Install fontspec from source Source: http://latex3.github.io/fontspec/install.html Run this command after cloning the repository to compile documentation and install files into the local texmf tree. ```bash l3build install ``` -------------------------------- ### Install test fonts Source: http://latex3.github.io/fontspec/dev.html Commands to clone and install the required fonts for the test suite and documentation build. ```shell git clone https://github.com/wspr/fontspec-test-fonts.git cd fontspec-test-fonts sh install.sh ``` -------------------------------- ### Install fontspec via tlmgr Source: http://latex3.github.io/fontspec/install.html Use this command to update or install the package if you are using TeX Live. ```bash tlmgr install fontspec ``` -------------------------------- ### Download fontspec TDS package Source: http://latex3.github.io/fontspec/install.html Direct link to the pre-built TDS package for manual installation into a local texmf tree. ```text http://mirror.ctan.org/install/macros/latex/contrib/fontspec.tds.zip ``` -------------------------------- ### Configure font family with mixed file extensions Source: http://latex3.github.io/fontspec/CHANGES.html Example of setting a main font family using different file extensions for upright and bold variants. ```latex \setmainfont{MyLato} [ UprightFont = Lato-Regular.ttf , BoldFont = FiraSans-Bold.otf , ] ``` -------------------------------- ### Set main font with specific upright file Source: http://latex3.github.io/fontspec/CHANGES.html Example of loading a font family while specifying the upright font file explicitly. ```latex \setmainfont{pagella}[ UprightFont = texgyrepagella-regular.otf ] ``` -------------------------------- ### Windows File Path Handling Source: http://latex3.github.io/fontspec/CHANGES.html Fixes a regression that prevented the use of Windows file paths starting with `C:\`. ```latex C:\\... ``` -------------------------------- ### Build documentation Source: http://latex3.github.io/fontspec/dev.html Command to generate the PDF documentation for the package. ```shell l3build doc ``` -------------------------------- ### Run all tests with options Source: http://latex3.github.io/fontspec/dev.html Command to execute the full test suite with randomization and early exit on failure. ```shell l3build check --shuffle --halt ``` -------------------------------- ### Run test suite Source: http://latex3.github.io/fontspec/dev.html Command to verify package changes against a specific test case. ```shell l3build check ``` -------------------------------- ### Expl3 Check-Declarations Option Source: http://latex3.github.io/fontspec/CHANGES.html Ensures that loading `expl3` with the `check-declarations` option runs without error. ```latex check-declarations ``` -------------------------------- ### Clone fontspec repository Source: http://latex3.github.io/fontspec/install.html Use git to obtain the latest development source code from the official GitHub repository. ```bash git clone git://github.com/latex3/fontspec.git ``` -------------------------------- ### Define font families and faces Source: http://latex3.github.io/fontspec/user.html Use these commands to create new font switches for specific font names and options. ```latex \newfontfamily\{}[] \newfontface \{}[] ``` -------------------------------- ### Set default document fonts Source: http://latex3.github.io/fontspec/user.html Configure the main, sans-serif, and monospaced fonts for the document. ```latex \setmainfont{}[] \setsansfont{}[] \setmonofont{}[] ``` -------------------------------- ### Graphite Font Loading and Documentation Source: http://latex3.github.io/fontspec/CHANGES.html Improves loading of Graphite fonts and adds basic documentation, noting the need for a better interface. ```latex Graphite fonts ``` -------------------------------- ### Handling Chained Keyval Choices Source: http://latex3.github.io/fontspec/CHANGES.html Fixes an occasional bug where only the first choice in chained keyval options like `Numbers={Lining,Proportional}` was recognized. ```latex Numbers={Lining,Proportional} ``` -------------------------------- ### Small Caps and Optical Sizes Interaction Source: http://latex3.github.io/fontspec/CHANGES.html Improves the interaction between optical sizes and small caps. ```latex small caps ``` -------------------------------- ### Emph and Strong Commands Source: http://latex3.github.io/fontspec/CHANGES.html Updates the behavior of `\emph` to act only on the NFSS font shape and introduces `\strong` as a weight analogy. ```latex \emph ``` ```latex \emfontdeclare ``` ```latex \strong ``` -------------------------------- ### Fixing Crashing Bugs Source: http://latex3.github.io/fontspec/CHANGES.html Addresses crashing bugs related to `..Reset`, `ResetAll` keys, and the `\newfontface` command. ```latex ..Reset ``` ```latex ResetAll ``` ```latex \newfontface ``` -------------------------------- ### Set global default font features Source: http://latex3.github.io/fontspec/user.html Define features that apply to all subsequently defined fonts. ```latex \defaultfontfeatures{} \defaultfontfeatures+{} ``` -------------------------------- ### Automated Test Suite Rewrite Source: http://latex3.github.io/fontspec/CHANGES.html Rewrites the test suite to enable correct and automatic testing, utilizing Travis CI. ```latex Travis CI ``` -------------------------------- ### Internal Code Simplification for Tracing Output Source: http://latex3.github.io/fontspec/CHANGES.html Corrects and simplifies internal code to fix a bug in how some fonts are displayed in `\tracingoutput` mode. ```latex \tracingoutput ``` -------------------------------- ### FontFace Space Handling Source: http://latex3.github.io/fontspec/CHANGES.html Fixes a bug in `FontFace` where spaces were not being ignored. ```latex FontFace ``` -------------------------------- ### Save test results Source: http://latex3.github.io/fontspec/dev.html Commands to save the expected output for a test case across XeTeX and LuaTeX engines. ```shell l3build save l3build save -e luatex ``` -------------------------------- ### Set specific default font features Source: http://latex3.github.io/fontspec/user.html Define features for a specific font name or switch. ```latex \defaultfontfeatures[]{} \defaultfontfeatures+[]{} ``` -------------------------------- ### Customizing Encodings Interface Source: http://latex3.github.io/fontspec/CHANGES.html Adds an experimental interface for customizing font encodings, with `TU` encoding now being the default. ```latex TU ``` -------------------------------- ### ResetAll for Tag-Based Features Source: http://latex3.github.io/fontspec/CHANGES.html Adds `ResetAll` functionality for all tag-based OpenType feature keys, such as `Ligatures=ResetAll`. ```latex ResetAll ``` ```latex Ligatures=ResetAll ``` -------------------------------- ### Scripts to Unicode Update Source: http://latex3.github.io/fontspec/CHANGES.html Updates Scripts to Unicode version 1.8.2. ```latex Unicode 1.8.2 ``` -------------------------------- ### Define New Font Language with Multiple Tags Source: http://latex3.github.io/fontspec/CHANGES.html Use this to define a new font language that can be identified by multiple OpenType tags. The package will try to use the first tag found. ```tex \newfontlanguage{Turkish}{TRK,TUR} ``` -------------------------------- ### Fixing Fontspec Loading Before \documentclass Source: http://latex3.github.io/fontspec/CHANGES.html Corrects a regression that caused an error message if `fontspec` was loaded before `\documentclass`. ```latex \documentclass ``` -------------------------------- ### Font Feature Management Source: http://latex3.github.io/fontspec/user.html Commands to manage and apply font features globally or locally. ```APIDOC ## \defaultfontfeatures and \addfontfeatures ### Description Configures default font features for subsequent definitions or adds features to the currently active font family. ### Parameters - **default font options** (list) - Required - Features to apply globally. - **font options to add** (list) - Required - Features to append to the current font. ``` -------------------------------- ### Ignoring Fontspec File Loading Source: http://latex3.github.io/fontspec/CHANGES.html Introduces the `IgnoreFontspecFile` feature to prevent loading a specific `.fontspec` file for a font. ```latex IgnoreFontspecFile ``` -------------------------------- ### Unicode-math Cross-over Code Source: http://latex3.github.io/fontspec/CHANGES.html Includes internal changes required by `unicode-math` to fix some cross-over code. ```latex unicode-math ``` -------------------------------- ### Document Default Font Commands Source: http://latex3.github.io/fontspec/user.html Commands to set the primary fonts for the document structure. ```APIDOC ## \setmainfont, \setsansfont, \setmonofont ### Description Sets the default fonts for the main document text, sans-serif text, and monospaced text respectively. ### Parameters - **font name** (string) - Required - The name of the font to set. - **font options** (list) - Optional - Key-value pairs for font features. ``` -------------------------------- ### Font Definition Commands Source: http://latex3.github.io/fontspec/user.html Commands for defining new font families or faces for use in a document. ```APIDOC ## \newfontfamily and \newfontface ### Description Defines a new command for selecting a specific font family or face. ### Parameters - **font switch** (command) - Required - The command name to define. - **font name** (string) - Required - The name of the font to load. - **font options** (list) - Optional - Key-value pairs for font features. ``` -------------------------------- ### Check if Feature is Available Source: http://latex3.github.io/fontspec/CHANGES.html Use these functions to check for the presence of specific font features, languages, or scripts. Ensure correct usage with TF variants. ```tex - `\fontspec_if_feature:n(TF)` - `\fontspec_if_language:n(TF)` - `\fontspec_if_current_script:n(TF)` - `\fontspec_if_current_language:n(TF)` ``` -------------------------------- ### Define Font Face with NFSS Family and Features Source: http://latex3.github.io/fontspec/CHANGES.html Load a font face with specific NFSS series and shape, and include arbitrary font features. This allows selection using the standard NFSS interface. ```latex \fontspec{myfont.otf}[ FontFace = {b}{ui}{Font = myfont-bui.otf, } , ] ``` -------------------------------- ### Load Unicode Font Encoding Source: http://latex3.github.io/fontspec/CHANGES.html Activate a new Unicode font encoding ('TU') to replace older encodings like EU1/EU2 and xunicode. Use the `[tuenc]` option. ```latex [tuenc] ``` -------------------------------- ### Nested Emph Behavior Source: http://latex3.github.io/fontspec/CHANGES.html Enhances nested `\emph` commands to intelligently nest even with manual font changes. ```latex \emph ``` -------------------------------- ### Fixing Fontspec File Support in LuaLaTeX Source: http://latex3.github.io/fontspec/CHANGES.html Removes documentation for `FeatureFile` as it's no longer supported in LuaLaTeX, suggesting alternative methods. ```latex FeatureFile ``` ```latex LuaLaTeX ``` -------------------------------- ### New OpenType Feature API Source: http://latex3.github.io/fontspec/CHANGES.html Introduces `\newopentypefeature` and provides `Feat`/`FeatOff`/`FeatReset` forms for all tag-based OpenType features. ```latex \newopentypefeature ``` ```latex Feat ``` ```latex FeatOff ``` ```latex FeatReset ``` -------------------------------- ### Ornament and FontIndex Features Source: http://latex3.github.io/fontspec/CHANGES.html Adds support for `Ornament=n` corresponding to OpenType feature `+ornm=n`, and `FontIndex=n` for TrueType Collection (TTC) files. ```latex Ornament= ``` ```latex +ornm= ``` ```latex FontIndex= ``` -------------------------------- ### Specify Font Face by Custom Name with Filename Source: http://latex3.github.io/fontspec/CHANGES.html When specifying a font face using a custom name with \defaultfontfeatures, you can now use 'Font=' to specify the filename. ```tex \defaultfontfeatures{Font=MyCustomFont.otf} ``` -------------------------------- ### Configure Monospaced Font Spacing Source: http://latex3.github.io/fontspec/CHANGES.html Adjust spacing after punctuation for monospaced fonts to improve alignment. Use `WordSpace` for a single space or `TwiceWordSpace` for two spaces. ```latex PunctuationSpace=WordSpace ``` ```latex PunctuationSpace=TwiceWordSpace ``` -------------------------------- ### Ligatures=TeX Override Regression Source: http://latex3.github.io/fontspec/CHANGES.html Fixes a regression in XeTeX where `Ligatures=TeX` would override `Mapping=..` regardless of declaration order. ```latex Ligatures=TeX ``` ```latex Mapping=.. ``` -------------------------------- ### Fixing \latinencoding Definition Error Source: http://latex3.github.io/fontspec/CHANGES.html This error occurred when loading `babel` before `fontspec`. The fix addresses a clash introduced in a previous version. ```latex ! Control sequence \latinencoding already defined. ``` -------------------------------- ### Using \prehyphenchar in LuaTeX Source: http://latex3.github.io/fontspec/CHANGES.html Replaces the `HyphenChar` feature when running LuaTeX with the `\prehyphenchar` LuaTeX primitive. ```latex \prehyphenchar ``` -------------------------------- ### Monospace Font in Documentation Source: http://latex3.github.io/fontspec/CHANGES.html Improves the monospace font used within the documentation. ```latex monospace font ``` -------------------------------- ### Define ad hoc font family Source: http://latex3.github.io/fontspec/user.html Apply font settings to a specific instance or block of text. ```latex \fontspec{}[] ``` -------------------------------- ### Set Default Font Features Source: http://latex3.github.io/fontspec/CHANGES.html Define default font features for specific font families like roman or headings. This is useful for setting consistent styles across your document. ```latex \defaultfontfeatures[\rmfamily]{...} ``` ```latex \defaultfontfeatures[\headingsfont]{...} \newfontfamily\headingsfont{...} ``` -------------------------------- ### Numbers=Tabular Alias Source: http://latex3.github.io/fontspec/CHANGES.html Adds `Numbers=Tabular` as an alias for `Numbers=Monospaced` for convenience. ```latex Numbers=Tabular ``` ```latex Numbers=Monospaced ``` -------------------------------- ### LuaLaTeX Verbatim Text Bug Source: http://latex3.github.io/fontspec/CHANGES.html Fixed a bug that caused garbage text to be printed in certain verbatim situations under LuaLaTeX. ```latex verbatim ``` -------------------------------- ### Resolving Font Feature Clashes Source: http://latex3.github.io/fontspec/CHANGES.html Attempts to resolve situations where font features clash, such as `Numbers={Uppercase,Lowercase}`, by defining only one feature to let the engine manage the outcome. ```latex Numbers={Uppercase,Lowercase} ``` ```latex +onum ``` ```latex +lnum ``` -------------------------------- ### Append to Default Font Features Source: http://latex3.github.io/fontspec/CHANGES.html Use `\defaultfontfeatures+` to append new features to the existing default font feature set, rather than replacing them. ```latex \defaultfontfeatures+ ``` -------------------------------- ### RawFeature and Fontspec Features Interaction Source: http://latex3.github.io/fontspec/CHANGES.html Fixes the interaction between `RawFeature` and standard `fontspec` features. ```latex RawFeature ``` -------------------------------- ### Define Font Shapes for Nested Emph Source: http://latex3.github.io/fontspec/CHANGES.html Use the `\emfontdeclare` command to define font shapes when arbitrarily nesting the `\emph` command. This ensures correct styling for nested emphasis. ```latex \emfontdeclare ``` -------------------------------- ### OpenType Feature Tag Cross-referencing Source: http://latex3.github.io/fontspec/CHANGES.html Provides a table to cross-reference fontspec features with their corresponding OpenType feature tags. ```latex Script selection ``` -------------------------------- ### Fixing Polyglossia Conflict Source: http://latex3.github.io/fontspec/CHANGES.html Resolves a conflict with Polyglossia when using the `Scale=MatchLowercase` option. ```latex Scale=MatchLowercase ``` -------------------------------- ### API Query for Font Features Source: http://latex3.github.io/fontspec/CHANGES.html Fixes an obscure API bug where a query for a selected font feature would incorrectly test against the upright font in the current family. ```latex font feature ``` -------------------------------- ### Fixing Fontspec Regression Source: http://latex3.github.io/fontspec/CHANGES.html Fixes a regression with `\fontspec_if_feature:nTF` which had broken `realscripts`. ```latex \fontspec_if_feature:nTF ``` ```latex realscripts ``` -------------------------------- ### TTC Fonts and LuaTeX Issue Source: http://latex3.github.io/fontspec/CHANGES.html Notes a known issue with loading TTC fonts through the `fontspec` interface in LuaTeX, which is expected to be addressed by the `luaotfload` package. ```latex TTC fonts ``` ```latex LuaTeX ``` ```latex fontspec ``` ```latex luaotfload ``` -------------------------------- ### Set Font Script Tags for Indic Fonts Source: http://latex3.github.io/fontspec/CHANGES.html Incorporate new font script tags for Indic fonts. Fontspec will query for specific OpenType script tags (e.g., `bng2`) and fall back to others (e.g., `beng`) if not found. ```latex Script=Bengali ``` -------------------------------- ### Handling HyphenChar=None in LuaLaTeX Source: http://latex3.github.io/fontspec/CHANGES.html Re-enables the use of `HyphenChar=None` in LuaLaTeX, decoupling hyphenation from font choice except for this specific setting. ```latex HyphenChar=None ``` -------------------------------- ### Set NFSS Family for a Font Source: http://latex3.github.io/fontspec/CHANGES.html Assign an NFSS family name to a font using the `NFSSFamily` feature. This is useful when integrating with packages that use the `\fontfamily{...}\selectfont` interface. ```latex NFSSFamily=ABC ``` -------------------------------- ### Add features to current font Source: http://latex3.github.io/fontspec/user.html Modify the features of the font family currently in use. ```latex \addfontfeatures{} ``` -------------------------------- ### Checking Fontspec Feature Status Source: http://latex3.github.io/fontspec/CHANGES.html Provides API functions for checking if a specific font feature is currently active, based on its OpenType tag or fontspec specification. ```latex \fontspec_if_feature:nTF ``` ```latex \fontspec_if_current_feature:nTF ``` ```latex \IfFontFeatureActiveTF ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.