baruchel / txt2pdf

Text to PDF converter with Unicode support
MIT License
75 stars 46 forks source link

ENHANCEMENT idea - character translation table support #28

Closed clach04 closed 2 years ago

clach04 commented 2 years ago

Add a flag that loads a table of translations for characters. Could be used to replace https://github.com/baruchel/txt2pdf/pull/27 and handle any characters.

Idea would be to use json for config, with key either being a string or a integer of the Unicode point, with the value being a string.. E.g.:

{
    "(": "X",
    40: "X",   ##### NOTE this is the same as above, 40 == 0x28 == 0x0028 == "("
}