For the most part, fonts don't use a pixel system when displaying on the screen. It's a point system. Depending on the font in question it could be much smaller than the pixel size you want or much larger (although I haven't seen it end up larger) than you want. I ran across this when trying to center text in iLaunch. Hope this helps clear things up.
cheers,
-p0z3r
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the API documentation, the argument to setRichTextWidth is in pixels, so I shouldn't need to care about what point sizes my fonts are, should I?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you are right after looking up the setRichTextWidth() call.. ("this function changes it's width to the specified value in pixels. ")
I'll have to try it to see what it does on my machine and let you know if this is just you or everyone.
cheers,
-p0z3r
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following code doesn't seem to work as intended:
t = karamba.createRichText(widget, 50*". ")
karamba.setRichTextWidth(widget, t, 100)
It prints out several lines of dots, but the width is not 100 pixels, but more like 90 pixels.
Is this a bug?
For the most part, fonts don't use a pixel system when displaying on the screen. It's a point system. Depending on the font in question it could be much smaller than the pixel size you want or much larger (although I haven't seen it end up larger) than you want. I ran across this when trying to center text in iLaunch. Hope this helps clear things up.
cheers,
-p0z3r
According to the API documentation, the argument to setRichTextWidth is in pixels, so I shouldn't need to care about what point sizes my fonts are, should I?
I think you are right after looking up the setRichTextWidth() call.. ("this function changes it's width to the specified value in pixels. ")
I'll have to try it to see what it does on my machine and let you know if this is just you or everyone.
cheers,
-p0z3r