7:134 7ˆl–Ðz¾””Ê:”Ê‚ ÁãaS�ÿ�þE+Ž,Ü¡h¯8ødüÿ „‚Ë_ÁÀ¿/f--[[ File `frenchb.lua’ generated from frenchb.dtx [2023/01/02 v3.5p French support from the babel system] Copyright © 2014-2022 Daniel Flipo License LPPL: see french.ldf. --]] local FB_punct_thin = {[string.byte("!")] = true, [string.byte("?")] = true, [string.byte(";")] = true} local FB_punct_thick = {[string.byte(":")] = true} local FB_punct_left = {[string.byte("!")] = true, [string.byte("?")] = true, [string.byte(";")] = true, [string.byte(":")] = true, [0x14] = true, [0xBB] = true} local FB_punct_right = {[0x13] = true, [0xAB] = true} local FB_punct_null = {[string.byte("!")] = true, [string.byte("?")] = true, [string.byte("[")] = true, [string.byte("(")] = true, [0xA0] = true, [0x202F] = true} local FB_guil_null = {[0xA0] = true, [0x202F] = true} local new_node = node.new local copy_node = node.copy local node_id = node.id local HLIST = node_id("hlist") local TEMP = node_id("temp") local KERN = node_id("kern") local GLUE = node_id("glue") local GLYPH = node_id("glyph") local PENALTY = node_id("penalty") local nobreak = new_node(PENALTY) nobreak.penalty = 10000 local nbspace = new_node(GLYPH) local insert_node_before = node.insert_before local insert_node_after = node.insert_after local remove_node = node.remove function FBget_glue(toks) local t = nil local f = string.match(toks, "[^%w]hskip%s*([%d%.]*)%s*[^%w]fontdimen 2") if f == "" then f = 1 end if tonumber(f) then t = {tonumber(f), 0, 0} f = string.match(toks, "plus%s*([%d%.]*)%s*[^%w]fontdimen 3") if f == "" then f = 1 end if tonumber(f) then t[2] = tonumber(f) f = string.match(toks, "minus%s*([%d%.]*)%s*[^%w]fontdimen 4") if f == "" then f = 1 end if tonumber(f) then t[3] = tonumber(f) end end elseif string.match(toks, "[^%w]F?B?thinspace") then t = {0.5, 0, 0} elseif string.match(toks, "[^%w]space") then t = {1, 1, 1} end return t end FBsp = {} FBsp.thin = {} FBsp.thin.gl = {} FBsp.thin.gl.fr = {.5, 0, 0} ; FBsp.thin.gl.ac = {} FBsp.thin.ch = {} FBsp.thin.ch.fr = 0x202F ; FBsp.thin.ch.ac = nil FBsp.colon = {} FBsp.colon.gl = {} FBsp.colon.gl.fr = { 1, 1, 1} ; FBsp.colon.gl.ac = {} FBsp.colon.ch = {} FBsp.colon.ch.fr = 0xA0 ; FBsp.colon.ch.ac = nil FBsp.guill = {} FBsp.guill.gl = {} FBsp.guill.gl.fr = {.8, .3, .8} ; FBsp.guill.gl.ac = {} FBsp.guill.ch = {} FBsp.guill.ch.fr = 0xA0 ; FBsp.guill.ch.ac = nil local font_table = {} local function new_glue_scaled (fid,table) if fid > 0 and table[1] then local fp = font_table[fid] if not fp then local ft = font.getfont(fid) if ft then font_table[fid] = ft.parameters fp = font_table[fid] end end local gl = new_node(GLUE,0) if fp then node.setglue(gl, table[1]*fp.space, table[2]*fp.space_stretch, table[3]*fp.space_shrink) return gl else return nil end else return nil end end local FBspacing = luatexbase.attributes['FB@spacing'] local addDPspace = luatexbase.attributes['FB@addDPspace'] local addGUILspace = luatexbase.attributes['FB@addGUILspace'] local FBucsNBSP = luatexbase.attributes['FB@ucsNBSP'] local FBdialect = luatexbase.attributes['FB@dialect'] local has_attribute = node.has_attribute -- Main function (to be added to the kerning callback). local function french_punctuation (head) node.kerning(head) for item in node.traverse_id(GLYPH, head) do local lang = item.lang local char = item.char if (lang == FR_fr or lang == FR_ca) and (FB_punct_left[char] or FB_punct_right[char]) then local fid = ite