Closed Bug 958932 Opened 12 years ago Closed 12 years ago

Skia doesn't scale fonts to the correct size

Categories

(Core :: Graphics: Text, defect)

24 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mark, Unassigned)

Details

Attachments

(3 files)

Attached image font-skia-firefox.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20131205180928 Steps to reproduce: 1. Disable Direct2D (I did this as a workaround for Bug 958931 ) 2. Render text in different font sizes (percentage) and check rendered sizes against what they should be. Actual results: See attached file. 120% and 125% are scaled to the exact same size; this is incorrect. Expected results: Font should have been scaled accurately to the proper size.
Attached file repor_issue_sample
I have installed Firefox/24.2.0 on windows 7. But I can't reproduce it by the attached. The following is config setting to repro this: gfx.canvas.azure.backends -> skia gfx.direct2d.disabled -> true Did I miss something?
it seems the base scale of fonts in your example is a little larger than what I found on the forum, but regardless: It's not a matter of drawing on canvas, it's a matter of drawing content and disabling Direct2D (which switches the content back-end to skia). See attach. Simply setting gfx.direct2d.enabled to false will do this. With Direct2D disabled, scaling of the fonts (for me at least) puts 110+115, 118+120, 123+125+127, and 130+133 at the same size. With it enabled, scaling seems to be accurate (but displays the anomaly from the other bug I mentioned). I don't know how skia scales the fonts - if it uses GDI fixed-point scaling for fonts then I guess this is "by design"?
I meant gfx.direct2d.disabled to true, of course. Sorry.
*facepalm* my bad, skia doesn't apply to content. I should pay more attention, I guess.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: