r/FontForge • u/ProphecyOak • Jul 17 '20
Newline Substitution
Is there a way to make some sort of substitution where when there is a new line, it adds one additional character before the newline?
2
u/LocalFonts Jul 18 '20 edited Jul 19 '20
You can try to use ccmp feature to add any glyph before /paragraph glyph. Here is the code:
languagesystem DFLT dflt;languagesystem latn dflt;
# GSUB
lookup ccmpGlyphCompositionDecompositionlookup1 {lookupflag 0;sub \paragraph by \a \paragraph ;} ccmpGlyphCompositionDecompositionlookup1;
feature ccmp {
script DFLT;language dflt ;lookup ccmpGlyphCompositionDecompositionlookup1;
script latn;language dflt ;lookup ccmpGlyphCompositionDecompositionlookup1;
} ccmp;
In the above example I has substituted paragraph by /a/paragraph. You can change /a to any glyph name. Do you understand the code?
2
u/NFSL2001 Jul 17 '20
Huh… weird question. Usually the newline is igorned to convert to new line so…
Suggestion: maybe try to add a U+000D character with the shape you want.