https://bugzilla.wikimedia.org/show_bug.cgi?id=50836

--- Comment #2 from kipod <[email protected]> ---
P.S: i used "abnormal" to signify that getCSS() returnd false, when called with
this font family and variant "normal". i do not think this is a good name -
maybe "empty" of "builtin" or something similar will be better, as long as one
can be confident it's not a valid fontFamily name. it has to eveluate as
boolean true, though, so you can;t use false or empty string.

alternatively, false can work, as long as you modify the first line to

if ( this.fonts.hasOwnProperty( fontFamily ) )

so the thing becomes

load: function( fontFamily ) {
    if ( this.fonts.hasOwnProperty( fontFamily ) )
        return this.fonts[fontFamily];
    var styleString = this.getCSS( fontFamily, 'normal' );
    if ( styleString ) {
        injectCSS( styleString );
        return this.fonts[fontFamily] = true;
    }
    return this.fonts[fontFamily] = false;
}

(for brevity, assign and return on one line - don't do it in real life).

peace.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to