Conversation
This unneeded if-statement made it impossible to change e.g. the 'Family' SFNT data from 'Sans Bold' to 'Sans'. Fixes fontforge#2635.
skef
left a comment
There was a problem hiding this comment.
I'm confused by this -- strcmp shouldn't return 0 when comparing "Sans" to "Sans Bold". Are you sure you have the analysis of your problem right?
You can try it out yourself and see it doesn't work properly. The font name stays 'Source Sans Pro,Source Sans Pro Semibold'. But after applying this patch it works properly: Now the font name is just 'Source Sans Pro', as intended. Here's the python script I used: font-name-fix.txt (just change extension to .py) |
|
It looks like the solution is slightly different. So for the English names the logic should be as follows:
Instead of deleting the |
Yeah, that does also seem to work for me. Removing the if-statement entirely or doing it your way both seem to work for fixing #2635, so either approach is fine with me. If your way is implemented, then this pull request can be closed. |
|
@iorsh Looks like the author would rather we implement the suggested fix rather than changing this PR. What do you think? |
This unneeded if-statement made it impossible to change e.g. the 'Family' SFNT data from 'Sans Bold' to 'Sans'. Fixes #2635.
Type of change