ios - UIFont doesn't set the correct font name when pointSize is 0 -


why uifont incorrectly print out font name when size set zero? when set size greater zero, correct font name output. there particular reason behind behavior or true bug.

uifont* f1 = [uifont fontwithname:@"helveticaneue-thin" size:0]; nslog(@"%@",f1); uifont* f2 = [uifont fontwithname:@"helveticaneue-thin" size:1]; nslog(@"%@",f2); 

output:

<uictfont: 0x7fb90c988e10> font-family: "helvetica"; font-weight: normal; font-style: normal; font-size: 0.00pt <uictfont: 0x7fad92177a90> font-family: "helveticaneue-thin"; font-weight: normal; font-style: normal; font-size: 1.00pt 

in the documentation:

fontsize size (in points) font scaled. value must greater 0.0.

you trying implement behaviour not supported. 'incorrect' result expected.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -