[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mozilla: configure menu fonts?



on Sun, Aug 12, 2001 at 08:28:29AM -0700, Craig Dickson (crdic@yahoo.com) wrote:
> Karsten M. Self wrote:
> 
> > File is ~/.mozilla/<user>/<odd string>/chrome/userChrome.css
> > 
> > Content that works for now:
> > 
> >     window{
> >       font-family: Helvetica !important;
> >       font-size: 8pt !important; */
> >       font-style: regular !important;
> >       font-weight: normal !important;
> >     }
> > 
> >     menubar, menubutton, menulist, menu, menuitem {
> >       font-family: Helvetica !important;
> >       font-style: regular !important;
> >       font-weight: normal !important;
> >       font-size: 8pt !important; 
> >     }
> 
> I see you've solved your problem. I can add to the solution a bit, though.
> 
> Here's my userChrome.css:
> 
>   button, input, menu, menubar, menubutton, menuitem, menulist, window {
>       font-family: verdana !important;
>       font-size: 3mm !important;
>   }
> 
> Notice I've added a few more object types to the list. This makes just
> about all of Mozilla's UI use the same font.

Thanks, got it.

> Is there any real documentation on this anywhere? 

AFAICT, no, which was one of the things I was starting to curse
creatively whilst looking for a solution last night.  There's a 
document, the XPTookkit (http://www.mozilla.org/xpfe/xptoolkit/), with a
XUL section, but best as I can tell, it's last updated 30 Jun 1999
(that's three years ago, if you're slow on math). 

> I browsed around the mozilla.org site for a while but couldn't find
> any complete definition of what you can put into the userChrome.css
> file. I only found examples, which were nice as far as they went but
> were far from comprehensive.  What are _all_ the object types, _all_
> the attribute names, _all_ the units of measurement that are accepted?

Since XUL is XML, somewhere there's an XML DTD specification for XUL
that should specify all this crap.  Fuck if I could tell you where that
is.  Some of the places I've stopped by in my wanderings.

There are a number of links from the main Mozilla.org  page, I've
followed several in depth with no luck in finding an attribute list
including, say, two target elements:  'font-size' and 'menubar'.

First, there's a plug for _Essential XUL Programming_ by Bullard, Smith,
and Daconta.  The table of contents lists "Appendix A:  XUL Programmer's
Reference", but I don't see anything that looks like an entity
reference.

    http://www.wiley.com/Corporate/Website/Objects/Products/0,9049,89266,00.html
    http://www.wiley.com/Corporate/Website/Objects/Products/0,9049,1775290,00.html
    
Going to the Mozilla FAQ leads on to "The XPToolkit"

    http://www.mozilla.org/xpfe/xptoolkit/

Again, no entity reference.

Links point to "Introduction to XUL"

    http://www.mozilla.org/xpfe/xptoolkit/xulintro.html

http://www.mozilla.org/xpfe/index.html

Hmmm...stabbing around more-or-less at random, I've stumbled across the
CSS2 Specification:

    http://www.w3.org/TR/REC-CSS2/

...which includes certain elements such as "font-face" and "font-size".
Interestingly, the first example for font-size is specified as points
'pt':

    http://www.w3.org/TR/REC-CSS2/fonts.html#font-size-props

So, CSS2 (plus or minus a version) seems to supply the entity attributes
for XUL.  Next question is:  where do we find out what the fuck we can
configure?

  - "A XUL Bestiary" isn't:
    http://www.mozilla.org/docs/xul/xulnotes/xulnote_beasts.html

    
  - The "XUL Widget Cheatsheet" comes close, though it's incomplete (no
    mention of windows, font-size:
    http://www.mozilla.org/xpfe/xptoolkit/

  - The "XUL Programmer's Reference" raises the meaning of "content
    free" to new heights:
    http://www.mozilla.org/xpfe/xulref

As I've copied a few Moz folk on this, I'd be very interested to know:

  - Where the DTD and all attributes are defined.
  - Why this isn't in the documentation.
  - If there's no comprehensive attributes listing, an explanation of
    why not.  This should be prominantly featured early in the available
    online XUL docs.



> Until I saw your example, I didn't even know that you could specify
> font sizes in points! 

I wung[1] that one, then searched Google and local configs under
/usr/lib/mozilla* for various combinations of 'font-size' to see what
the points argument was.

> The only examples I had seen used "mm" as the unit of measurement.

On the one hand, reasonable if your display measures true, OTOH, I'm
used to specifying *everything* in points, and have no idea what the
corresponding mm measurement is.

I've cc:'d xptoolkitstaff@netscape.com and Dave Hyatt <hyatt@netscape.com>
on this post.

All please note reply-to set to debian-user.


--------------------
Notes:

1.  Past tense of "wing".


-- 
Karsten M. Self <kmself@ix.netcom.com>          http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?             There is no K5 cabal
  http://gestalt-system.sourceforge.net/               http://www.kuro5hin.org
   Free Dmitry! Boycott Adobe! Repeal the DMCA!    http://www.freesklyarov.org
Geek for Hire                        http://kmself.home.netcom.com/resume.html

Attachment: pgpuCmXBQ4Pec.pgp
Description: PGP signature


Reply to: