-- @titre Caractères sans dessin -- @title Characters with no drawing -- @categorie relire -- @resume Les glyphes codés (qui portent un caractère Unicode) restés vides dans au moins un master, espaces et caractères invisibles exceptés. En option, ils sont marqués en gris. -- @summary Encoded glyphs (carrying a Unicode character) still empty in at least one master, spaces and invisible characters excepted. Optionally, they get a grey label. -- Fontista · bibliothèque de scripts · https://fontista.thinkspark.dev/scripts.html local MARK = false -- true: give them the grey colour label local en = lang == "en" local function invisible(cp) return cp < 0x21 or (cp >= 0x7F and cp <= 0xA0) or cp == 0xAD or cp == 0x034F or (cp >= 0x2000 and cp <= 0x200F) or (cp >= 0x2028 and cp <= 0x202F) or (cp >= 0x205F and cp <= 0x2064) or cp == 0x3000 or cp == 0xFEFF end local found = 0 for _, g in ipairs(font.glyphs) do local info = glyph(g) if info and info.unicode and info.export ~= false and not invisible(info.unicode) then local missing = {} for _, m in ipairs(font.masters) do local l = layer(g, m.id) if not l or l.empty then missing[#missing + 1] = m.name end end if #missing > 0 then found = found + 1 print(string.format("%-24s U+%04X %s %s", g, info.unicode, utf8.char(info.unicode), table.concat(missing, ", "))) if MARK then set_mark(g, 7) end end end end if found == 0 then print(en and "Every encoded character is drawn in every master." or "Tous les caractères codés sont dessinés dans tous les masters.") else print(string.format(en and "%d character(s) without drawing" or "%d caractère(s) sans dessin", found)) end