UNPKG

autokerning

Version:

autokerning computes suggested kerning values for glyph pairs from TrueType/OpenType fonts by rendering glyph bitmaps, applying a small Gaussian blur, and measuring pixel overlap across horizontal offsets. It can be used programmatically (as an imported E

185 lines (184 loc) 2.01 kB
// Common kerning pairs in typography (2-char only, no duplicates) export const COMMON_PAIRS = [ // Uppercase + Uppercase "AO", "AC", "AJ", "AQ", "AR", "AS", "AL", "AT", "AU", "AV", "AW", "AX", "AY", "AZ", "KC", "KO", "LC", "LO", "LQ", "LT", "LY", "OA", "OE", "OV", "OW", "PA", "Po", "RO", "RQ", "TA", "TH", "TO", "TQ", "TT", "TV", "TW", "VA", "VE", "VO", "WA", "WE", "WO", "YA", "YL", "YT", "YV", "XC", "XO", "XQ", // Uppercase + lowercase "At", "Ar", "An", "Be", "By", "De", "Do", "Fe", "Fi", "Fl", "Fo", "Ge", "Ha", "He", "Ho", "If", "In", "Is", "It", "Ka", "La", "Le", "Li", "Lo", "No", "Of", "On", "Or", "Pa", "Pe", "Pr", "Re", "Se", "So", "Ta", "Tc", "Td", "To", "Te", "Ti", "Tm", "Tq", "Tg", "Tr", "Ts", "Tu", "Tx", "Ty", "Tv", "Tw", "Up", "Us", "Wa", "We", "Wo", "Ya", "Ye", "Yi", "Yo", "Yu", "We", "Who", "Why", // lowercase + lowercase "ae", "av", "aw", "ay", "Co", "ff", "fi", "fl", "he", "la", "le", "lo", "ly", "ma", "me", "mo", "na", "ne", "no", "nu", "oa", "oe", "or", "oo", "pa", "pe", "po", "pu", "re", "ri", "ro", "rm", "rn", "ru", "ta", "te", "ti", "to", "tr", "tu", "ty", "ua", "ue", "uo", "va", "ve", "vo", "wa", "we", "wo", "ya", "ye", "yo", // Accented variants (if font supports) "Àv", "Àc", "Àt", "Àw", "Ão", "Áv", "Tn", "Yp", "Yd", "Th", "Yp", "Yd", ];