lifelike / countersheetsextension

Inkscape extension for the layout of sheets of cards, tiles, or counters for boardgames.
Other
236 stars 27 forks source link

Fix for issue #34, remember text styles even when bold and italic markup is used. #37

Closed fractalpixel closed 6 years ago

fractalpixel commented 6 years ago

Keeps track of all text style properties, and only changes the font-weight for bold areas and font-style for italic areas. This ensures that the font, font size, and others stay the same.

Uses parseStyle and formatStyle functions from inkscapes simplestyle.py to split the text style into a dictionary and back to a string (I just copy pasted them here, it could be nicer to include them from wherever they are, but this works and they are small functions).

lifelike commented 6 years ago

Thanks! It looks good. Eventually I should have a look at making sure that the different places in the code where style is managed use the same helper functions, because there is probably some redundancy.