Closed Bug 335076 Opened 18 years ago Closed 18 years ago

[BeOS] Wrong rendering of point-sized font tags

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergei_d, Assigned: sergei_d)

References

()

Details

(Keywords: fixed1.8.1)

Attachments

(3 files)

This problem started to be visible after 
https://bugzilla.mozilla.org/show_bug.cgi?id=327406
checkin.
Two users noticed it with dualhead setup, so virtual screen size was 2560 * 1024.
http://beos.spb.ru/mozilla/MozillaFontPointSizeBug2.png - look at counter at
bottom.
But it should be noticeable with single moder big monitors too, so i'm wondering if someone has 1960*1200 or such monitor here.

Problem is lack of DPI API (and DPI-awarness at all) in BeOS, so we use some tricks here
http://lxr.mozilla.org/seamonkey/source/gfx/src/beos/nsDeviceContextBeOS.cpp#136

but it seems that following code is also not so perfect.

As possible fixes and workarounds i propose
1)add "layout.css.dpi" also to BeOS section of all.js
2)restrict max resolution unconditionally to some valuse in nsDeviceContext - but what that value should be?
72 (this is DPI with which BeOS was designed in mind) produces too small fonts) ?
96?
Looks like it needs testing
3)that hack in source code before - I propose int(mHeightFloat*72./600.);
instead. As hardly someone will set dualhead to increase vertical resolution - it is hard to imagine monitors on top of eachother. Even Bill Gates don't do it with his 3 monitors!

4)Currently we always report single monitor in ScreenManager:
NS_IMETHODIMP
nsScreenManagerBeOS :: GetNumberOfScreens(PRUint32 *aNumberOfScreens)
{
  *aNumberOfScreens = 1;
  return NS_OK;
}
Looks like times are changing, but I'm doubt that there is good piblic BeOS API to handle this poblem
Attached image screenshot for bug URL
screenshot of haiku CIA
Do you know anything more about why the fonts are to small at 72dpi?

I suspect I might be of little help in fixing this though.
I fount that res somewhere between 84 and 88 is optimal.
And it is approximate DPI for 15" 1024*x and 19" 1280*x and 20" 1680*x monitors.
I think we will use fixed OSDpi value instead that fake-calculated, after getting more feedback from users.
Attached patch patchSplinter Review
adding "layout.css.dpi" to BeOS section of all.js
Assignee: beos → sergei_d
Status: NEW → ASSIGNED
Attachment #220240 - Flags: review?(thesuckiestemail)
Attached patch patchSplinter Review
Setting fixed average value (85) as OSVal for Dpi.
Attachment #220241 - Flags: review?(thesuckiestemail)
Comment on attachment 220240 [details] [diff] [review]
patch

r=thesuckiestemail@yahoo.se

This workaround is ok by me, I assume you have tested this on a few different setups already from what I can understand.
Attachment #220240 - Flags: review?(thesuckiestemail) → review+
Attachment #220241 - Flags: review?(thesuckiestemail) → review+
Comment on attachment 220240 [details] [diff] [review]
patch

as this is change inside common for all platforms file, i think it needs second review
Attachment #220240 - Flags: review?(dbaron)
Checking in mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp,v  <--  nsDeviceContextBeOS.cpp
new revision: 1.34; previous revision: 1.33
done 
Checking in mozilla/modules/libpref/src/init/all.js;
/cvsroot/mozilla/modules/libpref/src/init/all.js,v  <--  all.js
new revision: 3.635; previous revision: 3.634
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Going to land in the branch.
Blocks: 311032
Comment on attachment 220240 [details] [diff] [review]
patch

Requesting permission to land in the MOZILLA_1_8_BRANCH.

This is a BeOS-only change and does not affect other platforms.

Note: sergei_d: Apply after bug 316305.
Attachment #220240 - Flags: review?
Comment on attachment 220241 [details] [diff] [review]
patch

Requesting permission to land in the MOZILLA_1_8_BRANCH.

This is a BeOS-only change. Testing on the trunk showed that no other platforms were affected.

Note: sergei_d: second and last patch on this bug.
Attachment #220241 - Flags: approval1.8.1?
Comment on attachment 220241 [details] [diff] [review]
patch

a=drivers, BeOS the TheOS! :)
Attachment #220241 - Flags: approval1.8.1? → approval1.8.1+
Checking in mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp,v  <--  nsDeviceContextBeOS.cpp
new revision: 1.31.8.2; previous revision: 1.31.8.1
done
Checking in mozilla/modules/libpref/src/init/all.js;
/cvsroot/mozilla/modules/libpref/src/init/all.js,v  <--  all.js
new revision: 3.585.2.48; previous revision: 3.585.2.47
done 
Keywords: fixed1.8.1
Attachment #220240 - Flags: review?
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: