diff options
author | Karl Berry <karl@freefriends.org> | 2024-09-11 20:27:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-09-11 20:27:32 +0000 |
commit | 79608ac5b7bddcab6b1db198bdf45c667c032b7c (patch) | |
tree | 8fe55ed9e92920115b23e227ef40194b51c353bc /Master/texmf-dist/doc | |
parent | 2345e5a3ef263d2fde417fa8b6e5f4b78cb5d29c (diff) |
cascadiamono-otf (11sep24)
git-svn-id: svn://tug.org/texlive/trunk@72257 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/fonts/cascadiamono-otf/README.md | 45 | ||||
-rw-r--r-- | Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.pdf | bin | 0 -> 93858 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.tex | 155 |
3 files changed, 200 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/fonts/cascadiamono-otf/README.md b/Master/texmf-dist/doc/fonts/cascadiamono-otf/README.md new file mode 100644 index 00000000000..6a81169309f --- /dev/null +++ b/Master/texmf-dist/doc/fonts/cascadiamono-otf/README.md @@ -0,0 +1,45 @@ +cascadiamono-otf fonts +====================== + +## Description + +`cascadiamono-otf` is the version of cascadiacode-otf without ligatures. +Official repo is https://github.com/microsoft/cascadia-code +CascadiaCode is already present, it's just a fontspec file for using CascadiaMono version :-) + +## Contents + +* the `tex/` directory holds the fontspec configuration files; +* the `doc/` directory holds short documentation with samples. + +## Usage + +lualatex/xelatex and fontspec are necessary in order to use cascadiamono fonts. + +'Normal' version of the font is available with `\setmonofont{CascadiaCode}[options]`. +'SemiLight' version of the font is available with `\setmonofont{CascadiaCode-Light}[options]`. + +## Installation + +This package is meant to be installed automatically by TeXLive, MikTeX, etc. +Otherwise, `cascadiamono-otf` can be installed under TEXMFHOME or TEXMFLOCAL, f.i. + ++ fontspec files (`tex/*.fontspec`) in directory `texmf-local/tex/latex/cascadiamono-otf/` ++ documentation (from doc/ directory) in `texmf-local/doc/fonts/public/cascadiamono-otf/` + +Don't forget to rebuild the file database (mktexlsr or so) if you install under TEXMFLOCAL. + +Finally, you may want to make the system font database aware of the `cascadiamono-otf` fonts (fontconfig under Linux). + +## License + +* Files are distributed under the terms of the LaTeX Project +Public License from CTAN archives in directory macros/latex/base/lppl.txt. +Either version 1.3 or, at your option, any later version. + +## Changes +* First release version: 0.1 (experimental). + +--- +Copyright 2024 C. Pierquet (with help from D. Flipo) +E-mail: cpierquet (at) outlook (dot) fr diff --git a/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.pdf b/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.pdf Binary files differnew file mode 100644 index 00000000000..3561a9538b6 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.pdf diff --git a/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.tex b/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.tex new file mode 100644 index 00000000000..eccc5953c6b --- /dev/null +++ b/Master/texmf-dist/doc/fonts/cascadiamono-otf/cascadiamono-otf-doc.tex @@ -0,0 +1,155 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: lualatex: {shell: no, synctex: no, interaction: batchmode} + +\documentclass{article} +\usepackage[margin=1in]{geometry} +\usepackage{fontspec} +\usepackage{listings} +\usepackage{xcolor} +\setlength{\parindent}{0pt} + +\newcommand\demotext{For \textsterling 45, almost anything can be found floating in fields.\\ + !`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!\\ + --- ?`But aren't Kafka's Schlo\ss{} and \AE sop's \OE uvres often na\"\i ve vis-\`a-vis the d\ae monic ph\oe nix's official r\^ole in fluffy souffl\'es? +} + +%\newcommand*\demotextsc{\textsc{\ Sphinx of black quartz, judge my vow}.} + +\begin{document} + +\part*{cascadiamono-otf} + +\section{Usage} + +With \lstinline[language=TeX,basicstyle=\ttfamily]|\usepackage{fontspec}| (so with \lstinline[language=TeX,basicstyle=\ttfamily]|XeTeX| or \lstinline[language=TeX,basicstyle=\ttfamily]|LuaLaTeX| compilation), you can use \texttt{CascadiaCode} fonts, and \textit{remove} ligature's features, in order to use (in fact) \texttt{CascadiaMono} fonts. + +\smallskip + +The idea is to propose \texttt{fontspec} config files to load correctly \texttt{CascadiaMono} features. + +\begin{lstlisting}[language=TeX,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +\usepackage{fontspec} +\setmonofont{CascadiaMono}[options] %version regular +\setmonofont{CascadiaMono-Light}[options] %version semilight +\end{lstlisting} + +\section{The default settings} + +Following OpenType fonts are supported (it's based on CascadiaCode without the ligatures) : + +\begin{lstlisting}[language=TeX,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +CascadiaCode-Bold.otf +CascadiaCode-BoldItalic.otf +CascadiaCode-ExtraLight.otf +CascadiaCode-ExtraLightItalic.otf +CascadiaCode-Italic.otf +CascadiaCode-Light.otf +CascadiaCode-LightItalic.otf +CascadiaCode-Regular.otf +CascadiaCode-SemiBold.otf +CascadiaCode-SemiBoldItalic.otf +CascadiaCode-SemiLight.otf +CascadiaCode-SemiLightItalic.otf +\end{lstlisting} + +The \texttt{fontspec} config for the \textit{normal} version : + +\begin{lstlisting}[language=TeX,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +\defaultfontfeatures[CascadiaMono] + {Extension=.otf, + UprightFont=CascadiaCode-Regular, + ItalicFont=CascadiaCode-Italic, + BoldFont=CascadiaCode-Bold, + BoldItalicFont=CascadiaCode-BoldItalic, + Contextuals=AlternateOff +} +\end{lstlisting} + +The \texttt{fontspec} config for the \textit{semilight} version : + +\begin{lstlisting}[language=TeX,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +\defaultfontfeatures[CascadiaMono-Light] + {Extension=.otf, + UprightFont=CascadiaCode-SemiLight, + ItalicFont=CascadiaCode-SemiLightItalic, + BoldFont=CascadiaCode-SemiBold, + BoldItalicFont=CascadiaCode-SemiBoldItalic, + Contextuals=AlternateOff +} +\end{lstlisting} + +\pagebreak + +\section{Font Samples} + +\subsection{Normal version (Regular - Italic - Bold - BoldItalic)} + +\setmonofont{CascadiaMono}[Scale=MatchLowercase] + +\texttt{\demotext}\par\bigskip + +\texttt{\textit{\demotext}}\par\bigskip + +\texttt{\textbf{\demotext}}\par\bigskip + +\texttt{\textbf{\textit{\demotext}}}\par + +\subsection{SemiLight version (SemiLight - SemiLightItalic - SemiBold - SemiBoldItalic)} + +\setmonofont{CascadiaMono-Light}[Scale=MatchLowercase] + +\texttt{\demotext}\par\bigskip + +\texttt{\itshape\demotext}\par\bigskip + +\texttt{\bfseries\demotext}\par\bigskip + +\texttt{\bfseries\itshape\demotext}\par + +\pagebreak + +\section{Algorithm samples} + +\subsection{Normal version} + +\setmonofont{CascadiaMono}[Scale=MatchLowercase] + +\begin{lstlisting}[language=Python,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +def Fibonacci(n) : + # Check if input is 0 then it will print incorrect input + if n < 0 : + print("Incorrect input") + elif n == 0 : + return 0 + elif n == 1 or n == 2 : + return 1 + else : + return Fibonacci(n-1) + Fibonacci(n-2) +\end{lstlisting} + +\subsection{SemiLight version} + +\setmonofont{CascadiaMono-Light}[Scale=MatchLowercase] + +\begin{lstlisting}[language=Python,basicstyle=\ttfamily,commentstyle=\itshape\color{gray},keywordstyle=\color{magenta},tabsize=4,frame=single] +def Fibonacci(n) : + # Check if input is 0 then it will print incorrect input + if n < 0 : + print("Incorrect input") + elif n == 0 : + return 0 + elif n == 1 or n == 2 : + return 1 + else : + return Fibonacci(n-1) + Fibonacci(n-2) +\end{lstlisting} + +\vfill + +\section{History} + +\begin{verbatim} +v0.1 Initial version +\end{verbatim} + +\end{document} |