Menu

#609 Further info: unicode crash with Adobe G2 fonts

final: 8.1.1
closed-fixed
nobody
2
2001-03-25
2000-10-31
No

OriginalBugID: 2406 Bug
Version: 8.1.1
SubmitDate: '1999-07-19'
LastModified: '2000-02-08'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 2405
OS: Windows 95
OSVersion: OSR3+IE5.0
Machine: X86
FixedDate: '2000-02-08'
FixedInVersion: 8.3

Name:
Kevin Kenny

CVS:
* RCS: @(#) $Id: tkWinFont.c,v 1.5 1999/04/16 01:51:51 stanton Exp $

CustomShell:
Patched as above

ReproducibleScript:
# The bug report that I submitted earlier today contains a questionable
patch.
# Pleas apply the attached one instead.

ObservedBehavior:
# The bad patch causes the G2 fonts to match various Unicode characters
# in the range 0x0100-0x0fff, incorrectly

DesiredBehavior:
# The symbol fonts should use the symbol encoding only for 8-bit
characters

Patch:
*** Tcl8.1/src/tk8.1/win/tkWinFont.c Thu Apr 29 15:38:42 1999
--- Tcl8.1-from-source/src/tk8.1/win/tkWinFont.c Sat Jul 17 17:25:20 1999
***************
*** 2295,2304 ****
*/

for (i = 0; i < segCount; i++) {
! if ((startCount[i] & 0xff00) == 0xf000) {
startCount[i] &= 0xff;
- }
- if ((endCount[i] & 0xff00) == 0xf000) {
endCount[i] &= 0xff;
}
}
--- 2295,2303 ----
*/

for (i = 0; i < segCount; i++) {
! if ( ( startCount[i] & 0xff00 ) == 0xf000
! && ( endCount[i] & 0xff00 ) == 0xf000 ) {
startCount[i] &= 0xff;
endCount[i] &= 0xff;
}
}

PatchFiles:
tkWinFont.c

Patch applied, although I don't have a G2 font to test the change.
The fix is applied for 8.3.0.
-- 02/08/2000 hobbs

Discussion

  • Brent B. Welch

    Brent B. Welch - 2000-10-31
    • priority: 5 --> 2
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2001-03-25
    • labels: 104339 --> 47. Win Fonts