]> granicus.if.org Git - libass/commit
coretext: fix reading weights of some fonts
authorRodger Combs <rodger.combs@gmail.com>
Thu, 11 Oct 2018 07:32:50 +0000 (02:32 -0500)
committerOleg Oshmyan <chortos@inbox.lv>
Thu, 26 Sep 2019 13:48:42 +0000 (16:48 +0300)
commite52fd88b3b52e3da2dba167f3fbadb8342c6da56
tree095f00f6f1aa437a7b328a4fc4d262767d41f32e
parent2ed1760c88f348a72199aefd58ab3ff5ce06a35d
coretext: fix reading weights of some fonts

Some fonts have weights that can be expressed more precisely as doubles than
as floats. In these cases, when writing to a float, CFNumberGetValue will set
the value to the closest approximation, but return false (so we'd just clobber
whatever it set with 0). Easy fix: just store to a double instead.
libass/ass_coretext.c