Closed Bug 78939 Opened 23 years ago Closed 23 years ago

Unicode font support for Qt Mozilla

Categories

(Core Graveyard :: Ports: Qt, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: johng, Assigned: johng)

References

Details

Attachments

(7 files)

The 3 attached patches alter nsFontMetricsQT.cpp, nsFontMetricsQT.h and
nsRenderingContextQT.cpp to add unicode font support to Qt Mozilla.

NOTES:

1) This code requires Qt v2.2.4 or better to work properly.  It works under
previous versions of Qt, but some glyphs are not properly selected due to a bug
in the implementation of QFontMetrics::inFont that was fixed in 2.2.4.

2) Qt Mozilla does not seem to work with anti-aliased fonts in Qt 2.3 (I haven't
tried this myself, since I don't have the proper test environment yet - it is
based on reports from other people who have tried it).  This is due to a bug in
Qt where QFontDatabase will list the fonts on the system but doesn't seem able
to instantiate them.  I assume this will be fixed in Qt 3.0, but I will
investigate it as soon as I get the time to build a test environment that
includes anti-aliased fonts...
+          if ((*font)->SupportsChar(c)) {
remove space before |c|
+        if ((*font)->SupportsChar( c)) {

... SupportsChar and HasChar ...
Blocks: qt
Keywords: approval, patch, review
OT: Stupid question: Can someone check here whether this has been implemented
for XLib-toolkit and Xprint, please ?
Added my home email as a CC, since today is my last day at Corel.
New patch for nsFontMetricsQT.cpp includes new CharSets (based on Gtk port) and
a fix for anti-aliased font support in Qt v2.3.0.  TrollTech has promised to fix
the underlying bug in their AA font support in Qt v2.3.1 and v3.0.
Blocks: 76033
NOTE: There is a problem with the patches as they currently stand.  When I 
updated the patch for nsFontMetricsQT.cpp, I forgot to also update the patch for 
nsFontMetrics.h to account for some renamed functions (the renaming was done to 
follow the example of the GTK port).  As soon as I re-establish my development 
environment and am in a position to create a new patch, I will address this.  In 
the meantime, it should be possible for users with C++ coding experience to 
update the header file on their own, based on the compiler errors.
The last three attachments are now a complete set of fixes and enhancements for
QT Mozilla fonts.  These patches include:

- Support for Unicode and Double Byte character sets.
- Support for anti-aliased fonts under Qt 2.3.x (which fixes a crash on some
systems)
- Updated character set information taken from the Gtk port.
- Updated credits
I forgot to mention - TrollTech did not fix the anti-aliased font bug in v2.3.1,
so the updated patch extends the work-around for all releases after and
including 2.3.0.  I have tested with Qt 2.3.1 and the fix works for me.
r=blizzard
Comitted patches to CVS.  Please re-test.
*** Bug 76033 has been marked as a duplicate of this bug. ***
The patches for this have been commited to CVS, so I am marking this fixed.  
Please open a new bug report for any remaining font problems, assigned to 
jcgriggs@sympatico.ca (the Corel address is no longer valid).
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
rs vrfy fixed
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets → Ports: Qt
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: