Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

use other fonts in xulrunner app

66 views
Skip to first unread message

Pernot Christian

unread,
Oct 23, 2006, 10:25:29 AM10/23/06
to
Hello,

I'd like to use a "non-system" font in a xulrunner application.
Is there a way to load one?

Thank

Christian

Mark Finkle

unread,
Oct 23, 2006, 9:10:29 PM10/23/06
to
It appears to be specified in CSS (global.css actually). In your XUL
application CSS try this:

* {
font: normal normal normal medium normal serif;
}

It should set all element fonts to times roman (or something similar)

Mark Finkle

"Pernot Christian" <chri...@pingroom.net> wrote in message
news:_rednTyczv9HTaHY...@mozilla.org...

Pernot Christian

unread,
Oct 24, 2006, 7:34:43 AM10/24/06
to
Thank you for the answer,

but I aim to use an specific font (eg. infoText) from a font file (ttf,
of, or anything)

Any ideas?

Thanks

Christian


Mark Finkle a écrit :

Daniel Worthington

unread,
Oct 24, 2006, 12:04:38 PM10/24/06
to Pernot Christian, dev-te...@lists.mozilla.org
Pernot,

I may be wrong, but I think you need to include that font with the
application if you want to use it on another machine. You should be
able to use a stylesheet to specify the font you want to use by name:

someelement {
font-family: "My Font";
}

Assuming that the font is actually installed. Just like with a web
page, you can choose other fonts to use if the first one is not
available:

someelement {
font-family: "My Font", "Trebuchet MS";
}

Forgive me if I am missing the point of your question. If you are
asking about including a font within the application itself so that it
is always there, I have no idea how to do that.

Daniel

> _______________________________________________
> dev-tech-xul mailing list
> dev-te...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xul
>

Mark Finkle

unread,
Oct 25, 2006, 12:08:19 AM10/25/06
to
As Daniel points out, you can use an explicit font name in the CSS:

* {
font: normal normal normal medium normal "Arial";
}

I used an asterick '*' so all elements use the specified font, but you could
limit the font to specific elements as well.

"Pernot Christian" <chri...@pingroom.net> wrote in message

news:KoedneVeIu7OZ6DY...@mozilla.org...

Pernot Christian

unread,
Oct 25, 2006, 3:55:12 AM10/25/06
to
Thank you,

To be clearer, I want to use a not installed font.
And I don't want to install it (I don't have the authorization to do it).

Your first solution is a kind of what I want, but where to put the font
file is the package? and which font format should I use?

Christian

Daniel Worthington a écrit :

Jonathan Watt

unread,
Oct 25, 2006, 4:33:41 AM10/25/06
to
Hi,

Pernot Christian wrote:
> Thank you,
>
> To be clearer, I want to use a not installed font.
> And I don't want to install it (I don't have the authorization to do it).

So you want to bundle a font with your XULRunner application and be able to use
the font in the app without installing the font into the system? I'm not sure
whether XULRunner currently has facilities for that, but I'd suggest
mozilla.dev.platform is a better place for this thread. I believe this newsgroup
is specifically for discussing XUL, whereas you want to discuss how to use the
platform. (The "XUL" in XULRunner is a bit confusing in my opinion since XUL is
only one part of the XULRunner platform. Perhaps XULRunner should be renamed to
The Mozilla Platform or something else less likely to confuse.)

> Your first solution is a kind of what I want, but where to put the font
> file is the package? and which font format should I use?
>
> Christian

Regards,
Jonathan

0 new messages