Closed Bug 238771 Opened 20 years ago Closed 20 years ago

Want NT3.51 fallback code for EnumFontFamiliesEx

Categories

(Core Graveyard :: GFX: Win32, enhancement)

x86
Windows NT
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file, 2 obsolete files)

Since NT3.51 doesn't support EnumFontFamiliesEx I want to have some fallback
code that calls EnumFontFamilies instead. These functions are quite similar but
the Ex version also returns the unicode subrange bitfield. One of the calls to
EnumFontFamiliesEx does use the bitfield for truetype fonts so on NT3.51 I make
it fall back to !Ex with a flag not to test for truetype fonts. The other call
to EnumFontFamiliesEx does not use the bitfield, so a fallback was not strictly
necessary although I coded it that way for consistency.
Attached patch Proposed patch (obsolete) — Splinter Review
Assignee: win32 → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Oh, I should point out that these calls are needed a) for bold to work and
b) for the font lists in e.g. font preferences or editor/message compose.
Severity: normal → enhancement
Comment on attachment 144833 [details] [diff] [review]
Proposed patch

>      * EnumFontFamiliesExW is only on NT/2000
should that be changed to NT4+ as it now applies to XP and S2k3 and we know it
doesn't apply to NT3.51
Attachment #144833 - Flags: review?(ere)
Comment on attachment 144833 [details] [diff] [review]
Proposed patch

>+    if (!gGlobalFonts->Count())
...
>+  if (!weightInfo.mFontCount)

I would prefer | == 0| for integers and it would be more consistent with the
current code. Could you change these and the comment as timeless said?
Otherwise, r=ere
Attachment #144833 - Flags: review?(ere) → review+
Attached patch Addressed comments (!) (obsolete) — Splinter Review
Attachment #144833 - Attachment is obsolete: true
Attachment #147442 - Flags: superreview?(rbs)
To me it looks like the same patch as the first one.
Attached patch Fix dyslexiaSplinter Review
Sigh... it does help if I cvs diff to 238771.diff before I attach it :-[
Attachment #147442 - Attachment is obsolete: true
Attachment #147445 - Flags: superreview?(rbs)
jshin, this patch will undo some changes you did earlier. Are you okay? Or will
it regress Korean fonts?
Attachment #147442 - Flags: superreview?(rbs)
(In reply to comment #8)
> jshin, this patch will undo some changes you did earlier. Are you okay? Or will
> it regress Korean fonts?

Actually, the part of the change I made was to check the Unicode subrange for
Devanagari, Tamil and other scripts (that are not covered by TTF OS2 table), I
guess. Anyway, as far as I can tell (and as Neil wrote to me off-line), it
doesn't seem to do any harm because it's just adding a fallback for NT 3.51. 

In short, I'm Ok with the patch.
Comment on attachment 147445 [details] [diff] [review]
Fix dyslexia

sr=rbs
Attachment #147445 - Flags: superreview?(rbs) → superreview+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: