[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Better preserve atributes (c17e79d)
Marcel Fabian Krüger
tex at 2krueger.de
Thu Apr 28 15:56:35 CEST 2022
Repository : https://github.com/latex3/luaotfload
On branch : dev
Link : https://github.com/latex3/luaotfload/commit/c17e79d784c6ed69974ddfc6bcf4d17f80a12469
>---------------------------------------------------------------
commit c17e79d784c6ed69974ddfc6bcf4d17f80a12469
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu Apr 28 15:51:05 2022 +0200
Better preserve atributes
>---------------------------------------------------------------
c17e79d784c6ed69974ddfc6bcf4d17f80a12469
src/luaotfload-case.lua | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/luaotfload-case.lua b/src/luaotfload-case.lua
index a982a25..20c5506 100644
--- a/src/luaotfload-case.lua
+++ b/src/luaotfload-case.lua
@@ -275,7 +275,7 @@ local function process(table, feature)
-- When a vowel ges an accent removed and does not have a dialytika and is followed by a Ι or Υ,
-- then this iota or ypsilon gets a dialytika.
if datum & HAS_VOWEL ~= 0 and seen_greek and seen_greek ~= true and (upper == 0x0399 or upper == 0x03a5) then
- first_datum = first_datum | HAS_DIALYTIKA;
+ datum = datum | HAS_DIALYTIKA;
end
local has_ypogegrammeni = datum & HAS_YPOGEGRAMMENI ~= 0
local add_ypogegrammeni = has_ypogegrammeni
@@ -334,8 +334,11 @@ local function process(table, feature)
free(saved_tonos)
saved_tonos = nil
end
- -- Handle precomposed dialytika
- if first_datum & HAS_DIALYTIKA ~= 0 then
+ -- Handle precomposed dialytika. If both a combining ans a precomposed
+ -- dialyika are present (typically because the precomposed one is
+ -- automatically added at the beginning) prefer the combining one to
+ -- preserve attributes.
+ if datum & HAS_DIALYTIKA ~= 0 and not saved_dialytika then
if upper == 0x0399 then -- upper == 'Ι'
upper = 0x03AA
elseif upper == 0x03A5 then -- upper == 'Υ'
@@ -343,10 +346,6 @@ local function process(table, feature)
else
assert(false) -- Should not be possible
end
- if saved_dialytika then
- free(saved_dialytika)
- saved_dialytika = nil
- end
end
end
if greek_iota and add_ypogegrammeni then
More information about the latex3-commits
mailing list.