Closed Bug 137817 Opened 22 years ago Closed 2 years ago

Need to include external leading for normal Line-height, Mac only

Categories

(Core :: Internationalization, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID
mozilla1.3alpha

People

(Reporter: shanjian, Unassigned)

References

Details

(Keywords: fonts, intl, platform-parity)

Attachments

(1 obsolete file)

This is a bug split from bug 76097, which only handles windows.

For truetype font and opentype font, font api provides several font metrics,
like ascent, descent, internal leading, external leading, etc. When calculating
normal line height, we did not include external leading. After bug 76097 was
fixed, this external leading is returned to layout and was used to calculating
normal line height. Some of the fonts do not have either internal or external
leading, and they looks too compact. To handle such situation, I implement a
option to calculate a compensate external leading if font vendor does not
provide one. 

To be specific, here is what need to be done:
1. Find out if it is possible to figure internal leading and external leading. 
2. Add implemenation  for : 
    GetInternalLeading(nscoord &aLeading)
    GetExternalLeading(nscoord &aLeading)
   and remove:
    GetLeading(nscoord &aLeading)
    GetNormalLineHeight(nscoord &aHeight)
3. Add mac platform to nsIFontMetrics.h FONT_LEADING_APIS_V2 define list.
Keywords: intl
QA Contact: ruixu → ylong
any test cases and verification suites?
rbs- I want to work on this. But do you have any test cases ?
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1alpha
No, I don't have any testcases. Perhaps shanjian still have the testcases that 
he has been using for bug 76097.
Keywords: fonts
bug 76097 has a bunch of testcases. 
the attachment belongs to bug 125502. dont know why it came here. bugzilla bug?
sorry for the spam
now i know - bugzilla behaviour has changed. after posting a comment, instead of
returning to the same bug it sends me to the next bug on my 'list'. i didn't notice.
Blocks: 157673
Keywords: nsbeta1+
Whiteboard: [eta: 8/29/2002]
Hardware: PC → Macintosh
rbs, did you finish this work for us already or not ? Do I still need to work on
it ?
Work is still needed (as per comment 1). In fact, only Windows is up to speed at 
the moment, following shanjian's successive iterations over there to 
special-case CJK fonts (bug 156943).
Target Milestone: mozilla1.1alpha → mozilla1.2alpha
reassign to nhotta
Assignee: ftang → nhotta
Status: ASSIGNED → NEW
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Status: NEW → ASSIGNED
Whiteboard: [eta: 8/29/2002]
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Attachment #91496 - Attachment is obsolete: true
i18n triage team: nsbeta1-
Keywords: nsbeta1+nsbeta1-
Mac OS APIs and Win32 APIs are not compatible (they use the same terms
differently). It seems like an XP-way is to poke directly 
sTypoAscender/sTypoDescender/sTypoLineGap(?) of OS/2 table. A trouble with that
is not all truetype fonts have them set correctly. For that reason, Freetype2
(used in GFX:Gtk both by FT2 and Xft) doesn't rely on them (the code is there
but #if 0'd). It's a while ago that I looked at FT2 and Xft code so that I don't
remember what FT2 does instead(ref. bug 218032). Anyway, we can do what it does
here. Needless to say, if we can figure out formulae to translate MacOS 'API
values' to  Win32 'API values' (that we used in 76097), we don't have to look
into truetype tables directly.  
Summary: Need to include external leading for normal Line-height, MAC only → Need to include external leading for normal Line-height, Mac only
QA Contact: amyy → i18n

The bug assignee didn't login in Bugzilla in the last 7 months.
:m_kato, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: nhottanscp → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(m_kato)

Closing old bugs as invalid.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
Flags: needinfo?(m_kato)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: