If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

implement thebes@mac text/font support

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: YAMASHITA Makoto, Unassigned)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 12 obsolete attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060129 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060129 Firefox/1.6a1

There are four font apis on Mac: Font Manager, ATS for Fonts, ATSUI and Cocoa. We have to consider these problems:
- Symnol gets Sigma-psi-mu-... (Font Manager): bug 213702
- Indic font families lost (Font Manager, ATS): bug 246527
- Hiragino Kaku Gothic fonts are split into different families (Font Manager, ATS)
- No font family -> font face conversion in ATS
- ATSFontFamilyGetName is broken for non-ASCII font names(ATS): bug 213702 comment 16
I think ATSUI font functions are too low-level and we need a lot to do manage typeface management (...-Regular vs just the family name, Italic vs Oblique, weight conversion, etc.) while Cocoa already implements these.
We also need to determin how to implement font fallback and symbolic font conversion (e.g. math fonts)

Reproducible: Always

Steps to Reproduce:
(Reporter)

Comment 1

12 years ago
Created attachment 210078 [details]
using Cocoa for font metrics and family->face conversion
(Reporter)

Comment 2

12 years ago
Created attachment 210079 [details]
gfxMacFonts header
(Reporter)

Comment 3

12 years ago
Created attachment 210080 [details]
stub for gfxMacSurface
(Reporter)

Comment 4

12 years ago
Created attachment 210081 [details]
surface header
(Reporter)

Comment 5

12 years ago
Created attachment 210082 [details]
system fonts

just copied the relevant portion in nsDeviceContextMac (+ my work at bug 170854). Maybe we can swith to Cocoa for this too?
(Reporter)

Comment 6

12 years ago
Created attachment 210083 [details]
sys fonts header

and I have nsFontMetricsMac files (that cannot be compiled yet). Are they needed immediately?
Ok, looks like we've done a similar approach for a number of things in the font code bits.  I'll probably do a dump of my code into CVS on monday or tuesday to avoid more duplication.  There are various combinations of FMFontManager, ATS, and  Font Manager that should be able to give us the necessary functionality.  At the very least, we'd end up being bug-compatible with Safari on OSX.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 8

12 years ago
Yamashita-san, how does this impact bug 121540 (QD --> ATSUI) ?
(Reporter)

Comment 9

12 years ago
(In reply to comment #8)
> Yamashita-san, how does this impact bug 121540 (QD --> ATSUI) ?
The two are fairly independent, although text measurement code paths are borrowed from the changes to nsATSUIUtils.cpp there.
(Reporter)

Comment 10

12 years ago
Created attachment 213153 [details] [diff] [review]
sysfonts impl and gfxAtsuiFonts

Implements system fonts selection and adding error checks.
We can't use ATSUFindFontFromName that simple; the typeface obtained is not guaranteed to be Regular.
Attachment #210078 - Attachment is obsolete: true
Attachment #210079 - Attachment is obsolete: true
Attachment #210080 - Attachment is obsolete: true
Attachment #210081 - Attachment is obsolete: true
Attachment #210082 - Attachment is obsolete: true
Attachment #210083 - Attachment is obsolete: true
Attachment #213153 - Flags: review?(vladimir)
(Reporter)

Comment 11

12 years ago
Created attachment 213154 [details]
gfxMacFontManager.mm

So we have to use Cocoa or implement this by hand using ATSUFindFont... for family name and style name.
Attachment #213154 - Flags: review?
(Reporter)

Comment 12

12 years ago
Created attachment 213155 [details]
gfxMacFontManager.h
Attachment #213155 - Flags: review?
(Reporter)

Updated

12 years ago
Attachment #213154 - Flags: review? → review?(vladimir)
(Reporter)

Updated

12 years ago
Attachment #213155 - Flags: review? → review?(vladimir)
Hi, thanks for the patches!  I'm not too convinced of some of the changes, though.  Like I mentioned earlier, it sounds like we've both been heading in the same direction -- I've got some Cocoa-using changes locally as well since I landed the first bare-bones set of code.  However, please come talk to me first; otherwise we're going to continue to do duplicate work.  A number of us are in channel #gfx on irc, please join us there.
(Reporter)

Comment 14

12 years ago
Created attachment 215947 [details] [diff] [review]
new font manager

besides fixing the build bustage, this introduces a new font manager developed in bug 246527 and bug 121540. We need to add bold/italic synth management, but at least we get regular typeface when we need it with this...
Attachment #213153 - Attachment is obsolete: true
Attachment #213154 - Attachment is obsolete: true
Attachment #213155 - Attachment is obsolete: true
Attachment #213153 - Flags: review?(vladimir)
Attachment #213154 - Flags: review?(vladimir)
Attachment #213155 - Flags: review?(vladimir)
(Reporter)

Comment 15

12 years ago
Created attachment 215948 [details]
nsMacFonts.h

goes into thebes/public
(Reporter)

Comment 16

12 years ago
Created attachment 215949 [details]
nsMacFonts.cpp

Comment 17

12 years ago
assuming those are the right thing, they should just be added to gfxAtsuiFonts.{cpp,h} directly.  the tabs should be removed, and it should match the rest of the code in thebes (no ns* prefix, etc).
(Reporter)

Comment 18

12 years ago
Created attachment 216621 [details] [diff] [review]
new font manager v2 (in one patch)

this merges nsMacFonts.* with gfxAtsuiFonts. Also adds reasonable whitespace metrics measurement and a germ for (future) bold & italic synth handling.
Attachment #215947 - Attachment is obsolete: true
Attachment #215948 - Attachment is obsolete: true
Attachment #215949 - Attachment is obsolete: true

Updated

12 years ago
Blocks: 323934

Updated

11 years ago
Flags: blocking1.9+
This was fixed by a different implementation of ATSUI on mac
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.