[latex3-commits] [git/LaTeX3-latex3-fontspec] variable: Add variation axis interface (ae04fc4)

Marcel Fabian Krüger tex at 2krueger.de
Mon May 23 23:32:35 CEST 2022


Repository : https://github.com/latex3/fontspec
On branch  : variable
Link       : https://github.com/latex3/fontspec/commit/ae04fc4137211d5f286e157fd51c3f440800bf40

>---------------------------------------------------------------

commit ae04fc4137211d5f286e157fd51c3f440800bf40
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun May 22 01:24:00 2022 +0200

    Add variation axis interface


>---------------------------------------------------------------

ae04fc4137211d5f286e157fd51c3f440800bf40
 fontspec-code-keyval.dtx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/fontspec-code-keyval.dtx b/fontspec-code-keyval.dtx
index bb18912..dada0e8 100644
--- a/fontspec-code-keyval.dtx
+++ b/fontspec-code-keyval.dtx
@@ -760,14 +760,20 @@
 % \subsubsection{Continuous font axes}
 %
 %    \begin{macrocode}
+%<*XE>
 \@@_keys_define_code:nnn {fontspec} {Weight}
   {
     \@@_update_featstr:n{weight=#1}
   }
+%</XE>
+%<LU>\@@_define_opentype_variation_axis:nn {Weight} {wght}
+%<*XE>
 \@@_keys_define_code:nnn {fontspec} {Width}
   {
     \@@_update_featstr:n{width=#1}
   }
+%</XE>
+%<LU>\@@_define_opentype_variation_axis:nn {Width} {wdth}
 \@@_keys_define_code:nnn {fontspec} {OpticalSize}
 %<*XE>
   {
@@ -795,6 +801,14 @@
 %</LU>
 %    \end{macrocode}
 %
+% For other potentially font specific variation axes, there is a raw setter available:
+%    \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-opentype} {RawAxis}
+  {
+    \prop_gput_from_keyval:Nn \g_@@_rawvariations_prop {#1}
+  }
+%    \end{macrocode}
+%
 % \subsubsection{Font transformations}
 % These are to be specified to apply directly to a font shape:
 %    \begin{macrocode}





More information about the latex3-commits mailing list.