mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
Some fonts don't have the nbsp character, so we spend time looking for an alternate font. Instead, just change the nbsp to a space; they render the same. Bug 238598, r+sr=dbaron.
This commit is contained in:
parent
84bf14a4c0
commit
fc4b6890a3
@ -902,6 +902,13 @@ nsFontMetricsXft::CacheFontMetrics(void)
|
||||
nsFontXft *
|
||||
nsFontMetricsXft::FindFont(PRUint32 aChar)
|
||||
{
|
||||
// If we have an NBSP character, we can treat it as a normal space.
|
||||
// This helps because some fonts don't claim to support NBSP, and we waste
|
||||
// time looking for a font that does. The only difference is for
|
||||
// line-breaking, and that has already been done for us in layout.
|
||||
|
||||
if (aChar == 0xa0)
|
||||
aChar = ' ';
|
||||
|
||||
// If mPattern is null, set up the base bits of it so we can
|
||||
// match. If we need to match later we don't have to set it up
|
||||
|
Loading…
x
Reference in New Issue
Block a user