From owner-freebsd-ports Mon Mar 18 7:17:21 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D7D7537B790 for ; Mon, 18 Mar 2002 07:10:49 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2IFA1A43473; Mon, 18 Mar 2002 07:10:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6B81737B4E0 for ; Mon, 18 Mar 2002 07:06:13 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2IF6DV38471; Mon, 18 Mar 2002 07:06:13 -0800 (PST) (envelope-from nobody) Message-Id: <200203181506.g2IF6DV38471@freefall.freebsd.org> Date: Mon, 18 Mar 2002 07:06:13 -0800 (PST) From: Joe Kelsey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/36049: Mozilla 0.9.9 TrueType support broken Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36049 >Category: ports >Synopsis: Mozilla 0.9.9 TrueType support broken >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 18 07:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Joe Kelsey >Release: 4.5 >Organization: >Environment: FreeBSD zircon.zircon.seattle.wa.us 4.5-STABLE FreeBSD 4.5-STABLE #6: Mon Mar 4 08:38:11 PST 2002 joe@zircon.zircon.seattle.wa.us:/usr/obj/usr/src/sys/ZIRCON i386 >Description: Mozilla TrueType font support doesn't really work. Bugzilla PR#130661 describes the problem and provides a simple fix. >How-To-Repeat: Set up TrueType font support as described in the 0.9.9 release notes. Notice that the font style does not change (italic versus bold versus normal) when it should. >Fix: ? junk ? .nsFT2FontCatalog.cpp.swp ? .nsFreeType.cpp.swp ? .nsFT2FontCatalog.h.swp Index: nsFreeType.cpp =================================================================== RCS file: /cvsroot/mozilla/gfx/src/x11shared/nsFreeType.cpp,v retrieving revision 1.5 diff -u -r1.5 nsFreeType.cpp --- nsFreeType.cpp 28 Feb 2002 22:37:13 -0000 1.5 +++ nsFreeType.cpp 16 Mar 2002 00:46:44 -0000 @@ -1340,12 +1340,20 @@ nsFreeTypeFace * nsFreeTypeGetFaceID(nsFontCatalogEntry *aFce) { - // in this hash each ttc face has a unique key - nsCStringKey key(nsFT2FontCatalog::GetFamilyName(aFce)); + // We need to have separate keys for the different faces in a ttc file. + // We append a slash and the face index to the file name to give us a + // unique key for each ttc face. + nsCAutoString key_str(nsFT2FontCatalog::GetFileName(aFce)); + char buf[20]; + sprintf(buf, "/%d", nsFT2FontCatalog::GetFaceIndex(aFce)); + key_str.Append(buf); + nsCStringKey key(key_str); nsFreeTypeFace *face = (nsFreeTypeFace *)gFreeTypeFaces->Get(&key); if (!face) { face = new nsFreeTypeFace(aFce); NS_ASSERTION(face, "memory error while creating nsFreeTypeFace"); + if (!face) + return nsnull; gFreeTypeFaces->Put(&key, face); } return face; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message