Bug 36049 - Mozilla 0.9.9 TrueType support broken
Summary: Mozilla 0.9.9 TrueType support broken
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-18 15:10 UTC by Joe Kelsey
Modified: 2002-03-19 08:42 UTC (History)
0 users

See Also:


Attachments
file.diff (1.15 KB, patch)
2002-03-18 15:10 UTC, Joe Kelsey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kelsey 2002-03-18 15:10:01 UTC
Mozilla TrueType font support doesn't really work.  Bugzilla PR#130661 describes the problem and provides a simple fix.

Fix: ? junk
? .nsFT2FontCatalog.cpp.swp
? .nsFreeType.cpp.swp
? .nsFT2FontCatalog.h.swp
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.
Comment 1 Maxim Sobolev freebsd_committer freebsd_triage 2002-03-18 16:42:51 UTC
Joe Kelsey wrote:
> 
> >Number:         36049
> >Category:       ports
> >Synopsis:       Mozilla 0.9.9 TrueType support broken
> >Confidential:   no
> >Severity:       serious
> >Priority:       medium
> >Responsible:    freebsd-ports
> >State:          closed
> >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.

.oO

This is something I noticed too. I try your patch and will commit it
if it works. Please also submit it to Mozilla developers for
integration into the next release.

Thanks!

-Maxim

> >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
Comment 2 Joe Kelsey 2002-03-18 19:21:48 UTC
I pulled the patch from Mozilla Bugzilla 130661.  Maybe my original 
message was confusing?  I am currently running 0.9.9 with this patch, 
which is slated for 1.0.
Comment 3 Maxim Sobolev freebsd_committer freebsd_triage 2002-03-19 08:42:02 UTC
State Changed
From-To: open->closed

Committed, thank you very much!