Hi,

In my test page, I specified a line of text using "monospace" size 10
font.

But when I step thru the Firefox 3 code (specifically the following
method), the aFont.size() i get is 800.00.
My question is: "Why it is 80 times bigger than I expected? My source
html page specified a size 10.

NS_IMETHODIMP
nsThebesFontMetrics::Init(const nsFont& aFont, nsIAtom* aLangGroup,
                          nsIDeviceContext *aContext)
{
    mFont = aFont;
    mLangGroup = aLangGroup;
    mDeviceContext = (nsThebesDeviceContext*)aContext;
    mP2A = mDeviceContext->AppUnitsPerDevPixel();
    mIsRightToLeft = PR_FALSE;
    mTextRunRTL = PR_FALSE;
   // this becomes 800.00?
    gfxFloat orgFontSize = gfxFloat(aFont.size);
    //....

}

I try to grep for where  nsFont is created "http://mxr.mozilla.org/
firefox/search?string=nsFont", but I can't find where is the nsFont is
created.

Thank you.
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to