Thread: Forma Changing system font
View Single Post
Old 05-05-2020, 09:17 AM   #14
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,254
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by babygau View Post
i got this error and could you pls tell me what i did wrong?

Code:
Error: could not apply patches: invalid patch file 'src/font-patch-libnickel.yaml': patch "Font-family and font-size bulk change (part 2 of 2)": line 9: inst 3: FindReplaceString: replacement string 5 chars too short
here is content of line 9:

Code:
 - FindReplaceString:
      Find:    "\n  font-family: Avenir;\n"
# When editing the replacement values below,
# BE CAREFUL NOT TO CHANGE THE LENGTH OF THE REPLACEMENT STRING!
      Replace: "font-family:Bitner;"
      MustMatchLength: yes
Your patch states MustMatchLength: yes which means that your Find: and Replace: strings must be exactly the same length.

Based on the code you posted above:
Code:
Find:    "\n  font-family: Avenir;\n"
Replace: "font-family:Bitner;"
your Find & Replace strings (the parts between the double-quotes) are clearly NOT the same length, so correct the Replace string so that its length does match.

Alternatively you might find the thread kobopatch users & non-Kobo-supported languages useful (particularly posts #1, #2 and the summary in post #63) if you want to change the Kobo GUI fonts (Georgia and Avenir) to ones which support your language better.
jackie_w is offline   Reply With Quote