[latex3-commits] [git/LaTeX3-latex3-luaotfload] variable-cff2: Explicitly record regular style (a6fade1)

Marcel Fabian Krüger tex at 2krueger.de
Thu Sep 9 15:00:39 CEST 2021


Repository : https://github.com/latex3/luaotfload
On branch  : variable-cff2
Link       : https://github.com/latex3/luaotfload/commit/a6fade1b66a2a064956a0018adfeff99248593e4

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

commit a6fade1b66a2a064956a0018adfeff99248593e4
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Sep 9 15:00:39 2021 +0200

    Explicitly record regular style


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

a6fade1b66a2a064956a0018adfeff99248593e4
 src/luaotfload-features.lua    | 1 +
 src/luaotfload-harf-define.lua | 2 +-
 src/luaotfload-parsers.lua     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 550fe12..56ef051 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -324,6 +324,7 @@ local supported = {
     b    = "b",
     i    = "i",
     bi   = "bi",
+    r    = "r",
     aat  = false,
     icu  = false,
     gr   = false,
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index 09cef76..6ee52f8 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -168,7 +168,7 @@ local function loadfont(spec)
         elseif tag == slnttag and spec.style then
           design_coords[index] = spec.style == 'i' or spec.style == 'bi' and -5 or 0
         elseif tag == wghttag and spec.style then
-          design_coords[index] = spec.style == 'b' or spec.style == 'bi' and 600 or 400
+          design_coords[index] = (spec.style == 'b' or spec.style == 'bi') and 600 or 400
         elseif tag == opsztag and (spec.optsize or spec.size > 0) then
           design_coords[index] = spec.optsize or spec.size / 65536
         else
diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua
index e1764ab..67f951e 100644
--- a/src/luaotfload-parsers.lua
+++ b/src/luaotfload-parsers.lua
@@ -528,7 +528,7 @@ local featuresep = comma + semicolon
     we only support the shorthands for italic / bold / bold italic
     shapes, as well as setting optical size, the rest is ignored.
 --doc]]--
-local style_modifier    = (S'bB' * S'iI'^-1 + S'iI' * S'bB'^-1)
+local style_modifier    = (S'bB' * S'iI'^-1 + S'iI' * S'bB'^-1 + S'rR')
                         / stringlower
 local size_modifier     = S"Ss" * P"="    --- optical size
                         * Cc"optsize" * C(decimal)





More information about the latex3-commits mailing list.