Closed
Bug 158129
Opened 22 years ago
Closed 2 years ago
Add support for Adobe's Type1 Euro fonts
Categories
(Core :: Graphics: Text, defect)
Tracking
()
RESOLVED
WONTFIX
mozilla1.2beta
People
(Reporter: roland.mainz, Unassigned)
References
()
Details
Attachments
(5 files, 1 obsolete file)
96.25 KB,
application/octet-stream
|
Details | |
37.41 KB,
image/gif
|
Details | |
1.61 KB,
text/html
|
Details | |
16.98 KB,
patch
|
bstell
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
2.39 KB,
patch
|
Details | Diff | Splinter Review |
[Per http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&safe=off&th=5a8c34a30ab5662a&rnum=1] Adobe ships a set of one-glyph PS Type1 euro symbol fonts, see ftp://ftp.adobe.com/pub/adobe/type/win/all/ It would be nice if we could support these fonts to get cheap&simple euro support on Linux.
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 2•22 years ago
|
||
Comment 4•22 years ago
|
||
Roland, euro symbol displayed fine on Linux, why we want to support such a hack?
Reporter | ||
Comment 6•22 years ago
|
||
Shanjian Li wwrote:
> euro symbol displayed fine on Linux, why we want to support such a hack?
Actually the euro symbol support in Mozilla only works if ISO8859-15 (or
ISO10646-1) fonts are present. ISO8859-15 differs from ISO8859-1 (AFAIK) only in
the detail that the euro symbol replaced another (currency?) symbol ('¤'),
therefore this font would add Euro-support on those platforms without the need
to get other glyphs from those (somtimes very ugly) bitmap ISO8859-15 fonts (I
always wondered why pages in the ISO8859-15 encoding looks far worse than the
same HTML page in ISO8859-1 encoding - looks I found the root of all evil... ;-(
).
The Euro currency symbol has exactly one shape, therefore it should "fit"
correctly into all existing font families (this is just another vendor-specific
symbol font - like the Mathematica stuff, too).
Comment 7•22 years ago
|
||
Erh... I think this is a bad idea.
Reporter | ||
Comment 8•22 years ago
|
||
Peter Annema wrote:
> Erh... I think this is a bad idea.
I do not think it is bad.
Adobe created this font exactly for the purpose to get Euro-support for their
products.
Why can't we do the same (otherwise we end-up in the problem that we have either
non-existing euro-support or euro-support which looks bad...) ?
Comment 9•22 years ago
|
||
I misunderstood Roland. This idea seems better now, though it'll only benefit those people who have this font installed. As Roland pointed out, we could put this in release notes, and someone (else) can lobby with Linux distributors to ship this.
Reporter | ||
Comment 10•22 years ago
|
||
AFAIK we can implement this the same way as the support for the adobe symbol fonts...
Comment 11•22 years ago
|
||
Roland: are you proposing to use mozilla as a distribution system for X fonts?
Reporter | ||
Comment 12•22 years ago
|
||
bstell wrote:
> are you proposing to use mozilla as a distribution system for X fonts?
Heh... jag had the same question.
No, I am looking to fight the problem that our Euro-support is pretty worse on
older systems - pages with ISO8859-1 are OK, but pages with ISO8859-15 encoding
look pretty worse.
I wonder why we can't fix the problem by providing the "euro" symbol with the
special "euro"-symbol font and then treat every ISO8859-1 font as ISO8859-15
font (and replace char #80 (ISO8859-15 entry for the euro-symbol) with the
matching glphy from either a real ISO8859-15 font or adobe's special euro symbol
font).
Applix did that for their products, Adobe did that for their products - why
can't we do the same, too ?
Comment 13•22 years ago
|
||
> Heh... jag had the same question. Clearly it is an important question, :) > I wonder why we can't fix the problem by providing the "euro" symbol with the > special "euro"-symbol font and then treat every ISO8859-1 font as ISO8859-15 > font (and replace char #80 (ISO8859-15 entry for the euro-symbol) with the > matching glphy from either a real ISO8859-15 font or adobe's special euro > symbol font). Good idea. Moz already tries to do use the -15 euro symbol so adding the adobe font would be a good addition. http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#4542 4542 // before we put in the transliterator to disable double byte special chars 4543 // add the x-western font before the early transliterator 4544 // to get the EURO sign (hack) Were you thinking of adding the here or did you have a more agressive plan?
Reporter | ||
Comment 14•22 years ago
|
||
Brian Stell wrote:
> http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#4542
> 4542 // before we put in the transliterator to disable double byte
> special chars
> 4543 // add the x-western font before the early transliterator
> 4544 // to get the EURO sign (hack)
>
> Were you thinking of adding the here or did you have a more agressive plan?
It looks sufficient for me to put it "in" here, but a more agressive plan can't
hurt (the EURO-symbol has exactly one standardised shape and Adobe's euro symbol
font is scaleable, therefore we can't do much wrong here... :)
Maybe we can use the upcoming patch for the adobe euro sybol font as "blueprint"
for the other symbol fonts we do not support yet (like "*-dtsymbol-1",
"sunolglyph-1", "dec-dectech" etc. (I do not say we want to implement them all,
but having blueprints for adding support would be nice :))
Comment 15•22 years ago
|
||
> the EURO-symbol has exactly one standardised shape I am for this but I do want to point out that we still risk the "ransom note" effect. The glyph still might not match the font design; eg: relative to the primary font this glyph might be too light/bold, slanted, tall, wide/narrow, ... > and Adobe's euro symbol font is scaleable, What scaling technology? Without anti-aliased scaling even outline fonts tend to look poor.
Reporter | ||
Comment 16•22 years ago
|
||
Brian Stell wrote: > > the EURO-symbol has exactly one standardised shape > > I am for this but I do want to point out that we still risk the "ransom note" > effect. The glyph still might not match the font design; eg: relative to the > primary font this glyph might be too light/bold, slanted, tall, wide/narrow, > ... AFAIK we will only look at other fonts (like adobe's euro symbol font) if the "current" font doesn't have it, right ? Taking glyphs from other fonts isn't always perfect - but adobes euro symbol font package comes with some variations which should cover the common cases. > > and Adobe's euro symbol font is scaleable, > > What scaling technology? Without anti-aliased scaling even outline fonts tend > to look poor. OKOK, but it's still better to see the euro symbol instead of '?' ... =:-) Having matching euro fonts is better, but we need support for older environments, too. You can't tell companies/banks to upgrade to the latest/greatest OS version just to get the euro symbol in mozilla when all other applications have euro support with their current installation base.
Comment 17•22 years ago
|
||
"just to get the euro symbol in mozilla when all other applications have euro support with their current installation base." So far you've named Applix and Adobe. When did that become "_all other_ applications"?
Comment 18•22 years ago
|
||
in general this seems like a good thing to do
Reporter | ||
Comment 19•22 years ago
|
||
bstell/shanjian: Does support for '-adobe-eurosans-*-adobe-fontspecific'-fonts require anything else beyond the following two things: 1. A encoder in intl/uconv/ucvlatin/ (e.g. intl/uconv/ucvlatin/nsUnicodeToAdobeEuro.cpp) and 2. entries in +nsFontMetricsGTK.cpp/nsFontMetricsXlib.cpp That's all, right ?
Comment 20•22 years ago
|
||
That's the major things in my mind too. But I have no idea if they are complete or not. Mark it as assigned, but I won't have time for this bug in near future. Feel free to take it.
Status: NEW → ASSIGNED
Reporter | ||
Comment 21•22 years ago
|
||
Shanjian Li wrote: > That's the major things in my mind too. But I have no idea if they are > complete or not. bstell? > Mark it as assigned, but I won't have time for this bug in near future. > Feel free to take it. I can take it if someone can say if the list in comment #19 is complete or not (and if the answer is "no" I need the missing pieces of the puzzle...) ...
Comment 22•22 years ago
|
||
what is the encoding of '-adobe-eurosans-*-adobe-fontspecific'? I think you have to add an entry here: 408 static nsFontCharSetMap gCharSetMap[] = 409 { 410 { "-ascii", &FLG_NONE, &Unknown }, 411 { "-ibm pc", &FLG_NONE, &Unknown }, 412 { "adobe-fontspecific", &FLG_NONE, &Special }, and here: 546 static nsFontCharSetMap gSpecialCharSetMap[] = 547 { 548 { "symbol-adobe-fontspecific", &FLG_NONE, &AdobeSymbol }, and a converter
Reporter | ||
Comment 23•22 years ago
|
||
Brian Stell wrote: > what is the encoding of '-adobe-eurosans-*-adobe-fontspecific'? It looks that position 0x80 has the Euro sign (and some other places, too (for an unknown reason)) - that's all we need... :) > I think you have to add an entry here: > 408 static nsFontCharSetMap gCharSetMap[] = [snip] > and here: > 546 static nsFontCharSetMap gSpecialCharSetMap[] = [snip] > and a converter Thanks!
Reporter | ||
Comment 24•22 years ago
|
||
Next question: Where can I get the tool from to generate the *.uf mapping file (e.g. something like mozilla/intl/uconv/ucvlatin/adobesymbol.uf) ?
Comment 25•22 years ago
|
||
Check with ftang, he had conversion scripts but I cannot remember where they are.
Reporter | ||
Comment 26•22 years ago
|
||
Reporter | ||
Comment 27•22 years ago
|
||
Taking myself...
Assignee: shanjian → Roland.Mainz
Status: ASSIGNED → NEW
Reporter | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Reporter | ||
Comment 28•22 years ago
|
||
Reporter | ||
Comment 29•22 years ago
|
||
ToDo: - Figure-out why the patch doesn't work without the following hack: -- snip -- nsCAutoString ffre("*-symbol-adobe-fontspecific"); nsFontGTK* symbol_font = TryNodes(ffre, 0x0030); + // Add the Adobe Euro fonts before the early transliterator + nsCAutoString euro_ffre("*-euro*-adobe-fontspecific"); + nsFontGTK* euro_font = TryNodes(euro_ffre, 0x20AC); + // add the early transliterator // to avoid getting Japanese "special chars" such as smart // since they are very oversized compared to western fonts @@ -4623,6 +4633,9 @@ else if (symbol_font && CCMAP_HAS_CHAR(symbol_font->mCCMap, aChar)) { return symbol_font; } + else if (euro_font && CCMAP_HAS_CHAR(euro_font->mCCMap, aChar)) { + return euro_font; + } -- snip --
Reporter | ||
Comment 30•22 years ago
|
||
shanjian/bstell: Any ideas about the problem described in comment #29 ?
Comment 31•22 years ago
|
||
Probably because its one of the chars that gets transliterated. http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#613 613 // smart quotes (and other special chars) in Asian (double byte) 614 // fonts are too large to use is western fonts. 615 // Here we define those characters. 616 // 617 static PRUnichar gDoubleByteSpecialChars[] = { 618 0x0152, 0x0153, 0x0160, 0x0161, 0x0178, 0x017D, 0x017E, 0x0192, 619 0x02C6, 0x02DC, 0x2013, 0x2014, 0x2018, 0x2019, 0x201A, 0x201C, 620 0x201D, 0x201E, 0x2020, 0x2021, 0x2022, 0x2026, 0x2030, 0x2039, 621 0x203A, 0x20AC, 0x2122, 622 0 623 }; Until someone decides to spend the time to rework when the tranliteration happens (not a huge job but not small either) the code in comment 29 is correct and needed.
Reporter | ||
Comment 32•22 years ago
|
||
Brian Stell wrote: > Probably because its one of the chars that gets transliterated. > http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#613 > 613 // smart quotes (and other special chars) in Asian (double byte) > 614 // fonts are too large to use is western fonts. > 615 // Here we define those characters. > 616 // > 617 static PRUnichar gDoubleByteSpecialChars[] = { [snip] 621 0x203A, 0x20AC, 0x2122, OK, I am blind... Thanks for the hint... :) > Until someone decides to spend the time to rework when the tranliteration > happens (not a huge job but not small either) the code in comment 29 is > correct and needed. Is there a bug for that yet ?
Reporter | ||
Comment 33•22 years ago
|
||
Updated patch with minor cleanup and some comments to make the code little bit easier to read...
Attachment #100314 -
Attachment is obsolete: true
Comment 35•22 years ago
|
||
> Is there a bug for that yet ?
I don't think so.
Comment 36•22 years ago
|
||
Comment on attachment 100734 [details] [diff] [review] New patch for 2002-09-23-08-trunk r=bstell@ix.netcom.com
Attachment #100734 -
Flags: review+
Reporter | ||
Comment 37•22 years ago
|
||
Brian Stell wrote: > > > Until someone decides to spend the time to rework when the tranliteration > > > happens (not a huge job but not small either) the code in comment 29 is > > > correct and needed. > > > > Is there a bug for that yet ? > > I don't think so. Can you file it, please (and assign it to me) ? IMHO you can describe the issue far better than I can do... :)
Reporter | ||
Comment 38•22 years ago
|
||
bstell: If I remove the entry for the EURO-sybol in |gDoubleByteSpecialChars| the char doesn't get transliterated (on a system where I don't have any iso8859-15 fonts installed - I would expect that |FindSubstituteFont()| would kick in here - but instead |FindStyleSheetGenericFont()| returns a font which does not contain the EURO symbol - I get a blank displayed instead (e.g. no '?' or "EUR") ... ;-( ). Do you have any idea why this happens ?
Comment 39•22 years ago
|
||
Does the encoder for the font think it has a glyph for the euro char?
Reporter | ||
Comment 40•22 years ago
|
||
Brian Stell wrote:
> Does the encoder for the font think it has a glyph for the euro char?
It should not assume this since I only had iso8859-1&adobe-symbol fonts in my
font path during the test.
Comment 41•22 years ago
|
||
The whole encode scheme works on the assumption that the encoder knows what chars are in the font. So the question is: Does the encoder have the "correct" map for what is supposed to be in that font's registry-encoding (or familyName-registry-encoding for special fonts)? Does the font support the chars that are implied by the font's registry-encoding (or familyName-registry-encoding for special fonts)?
Reporter | ||
Comment 42•22 years ago
|
||
I'll file a new bug for the issue described in comment #38 to move the discussion&&investigation out of this one...
Reporter | ||
Comment 43•22 years ago
|
||
Requesting sr= ...
Comment on attachment 100734 [details] [diff] [review] New patch for 2002-09-23-08-trunk sr=roc+moz
Attachment #100734 -
Flags: superreview+
Comment 45•22 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 46•22 years ago
|
||
... but backed out because the Mac tinderboxen went red and I couldn't find Roland.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 47•22 years ago
|
||
Reporter | ||
Comment 48•22 years ago
|
||
Simon Montagu wrote:
> ... but backed out because the Mac tinderboxen went red and I couldn't find
> Roland.
Sorry, I was side-tracked for a few mins...
... you said I have to write 1000 times "I have to change the Mac build files
when I add new files" ... ;-(
Do you want that as FAX or is an Email sufficient ? :)
Status: REOPENED → ASSIGNED
Comment 49•2 years ago
|
||
Is this still an issue?
Comment 50•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:enndeakin, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: roland.mainz → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(enndeakin)
Updated•2 years ago
|
Component: XUL → Graphics: Text
Flags: needinfo?(enndeakin)
Comment 51•2 years ago
|
||
At this point, I don't think this is relevant any longer. There are plenty of standard fonts with support for the Euro sign on all platforms.
Status: NEW → RESOLVED
Closed: 22 years ago → 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•