[Project_owners] System Fonts

Joe Brochu jmbrochu at yahoo.com
Mon Jun 15 00:27:59 PDT 2009

I am looking for an easy way to get system fonts and sizes for 
explicitly setting box sizes within a stack to dynamically accommodate 
various native OS's.  Are there any shortcuts or global variables 
available within the Mozilla framework to reference this information?

I could probably create a piece of dummy text with no formatting and get 
numbers from there, but I'm hoping for something more elegant.  I also 
don't want to redraw everything 3 times!

I could also use something similar for getting scrollbar widths.  I have 
a workaround for this, but it's not particularly elegant.  Basically I 
get the width of the content within the scrollbox, then scroll to the 
end, then get the new start position of the scrolled content, on both 
axes.  A little addition and subtraction does the rest.  It does the 
job, but it ain't pretty.

Joe B


More information about the Project_owners mailing list