memononen / nanosvg

Simple stupid SVG parser
zlib License
1.69k stars 357 forks source link

Fixed rbg percentage parsing in nsvg__parseColorRGB #205

Closed AuthorityFX closed 2 years ago

oehhar commented 2 years ago

Dear AuthorityFX, thank you for the code, this is appreciated. Your proposal is to allow float numbers in the RGB field instead of integers. Do you have any rational for this? Remark that a rationale may help the pull request to be merged. Take care, Harald

AuthorityFX commented 2 years ago

Dear AuthorityFX, thank you for the code, this is appreciated. Your proposal is to allow float numbers in the RGB field instead of integers. Do you have any rational for this? Remark that a rationale may help the pull request to be merged. Take care, Harald

https://lists.w3.org/Archives/Public/www-svg/2014Jan/0109.html

I'm using assets exported from Adobe InDesign.

Adobe InDesign exports rgb percentage as floats. SVGs from InDesign are handled correctly in other parsers.

memononen commented 2 years ago

@AuthorityFX Thanks for the fix, and thanks @oehhar for triage.

oehhar commented 2 years ago

Thank you all for the action, I appreciate !