After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152997 - basic_engine_covers() always return PANGO_COVERAGE_EXACT
basic_engine_covers() always return PANGO_COVERAGE_EXACT
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
: 156225 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-18 12:50 UTC by Ivan Wong
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ivan Wong 2004-09-18 12:50:41 UTC
In 1.6, basic_engine_covers() always return PANGO_COVERAGE_EXACT. As a result, 
some characters (e.g. Chinese) are rendered with font that doesn't cover them.
Comment 1 Tor Lillqvist 2004-09-22 19:18:35 UTC
Indeed. Why are there two return statements after eachother? Probably just a 
mistake by Hans when he added the basic_engine_covers() function. But just 
removing the first unconditional "return PANGO_COVERAGE_EXACT", and relying on 
find_char() is not OK either. The function needs to take the language into 
account, too, because a font for Japanese shouldn't be used for Chinese, and 
ditto for the other CJK combinations. 

But the default implementation of the covers method in pango-engine.c does that 
(it uses the language-dependent font coverage as calculated by pangowin32, I 
assume), so I don't see why basic-win32.c needs to override the covers method 
at all? Hans?
Comment 2 Owen Taylor 2004-09-22 19:42:01 UTC
In general, avoiding creating the PangoCoverage objects may be a performance
win - pango_font_get_coverage() is essentially only ever called from
the default implementation of covers(), so if you override it you can
avoid creating the intermediate object.

(The fontconfig-based backends do it)

But the results of calling the engine's covers() method on a font should
certainly be similar to the results of the default implementation.
Comment 3 Hans Breuer 2004-09-23 21:24:56 UTC
Hi Tor,
looking again at the current implementation of _covers it seems as if I've first
tried find_char() similar to what basic-x.c does, noticed some problem (I dont't
remember anymore) which disappeared after adding return PANGO_COVERAGE_EXACT -
and forgot about it. Sorry for any incovenience caused, I'm definitely not a
Pango expert ;)
Comment 4 Tor Lillqvist 2004-09-25 20:15:28 UTC
Fixed in CVS, removed the implementation of the covers method in basic-win32.c.
Comment 5 Tor Lillqvist 2004-10-24 17:36:59 UTC
*** Bug 156225 has been marked as a duplicate of this bug. ***
Comment 6 Tor Lillqvist 2004-10-24 17:41:42 UTC
Now fixed in the pango-1-6 branch, too.
Comment 7 Tor Lillqvist 2004-11-13 02:27:40 UTC
*** Bug 156225 has been marked as a duplicate of this bug. ***