From c3a9f197c54dc806b82f42519bc7bf1df5ce3bf9 Mon Sep 17 00:00:00 2001 From: peaR Date: Tue, 26 May 2026 10:47:25 +0800 Subject: [PATCH] Disable default kerning when letterspacing is active --- src/luaotfload-harf-define.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua index 73a5c890..c819bfac 100644 --- a/src/luaotfload-harf-define.lua +++ b/src/luaotfload-harf-define.lua @@ -511,6 +511,13 @@ fonts.readers.harf = function(spec) spec.script = invalid_s spec.language = invalid_l end + + if rawfeatures.letterspace or rawfeatures.kernfactor then + if rawfeatures.kern == nil then + hb_features[#hb_features + 1] = hb.Feature.new("-kern") + end + end + for key, val in next, rawfeatures do if key:len() == 4 then -- 4-letter options are likely font features, but not always, so we do