/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
to get font set?
Fra : somez72


Dato : 04-07-01 15:52

Hi,all

to get fonts available in a system,how can I do?
what function can I use to get font set in Java?

Best Regards,
Sun Haeng.



 
 
Jacob Møller (04-07-2001)
Kommentar
Fra : Jacob Møller


Dato : 04-07-01 07:26


"somez72" <somez72@chollian.net> wrote in message
news:9hti6t$ii1$1@news1.kornet.net...
> Hi,all
>
> to get fonts available in a system,how can I do?
> what function can I use to get font set in Java?
>

Look in java.awt.Toolkit for:

getFontList()

-Jacob
www.kiloo.dk




Lars Hansen (05-07-2001)
Kommentar
Fra : Lars Hansen


Dato : 05-07-01 06:44

if you are using jdk1.2 or above, the Toolkit operation of selecting fonts
are deprecated.
you can use the following code to ask the system
Font fonts[] =
java.awt.GraphicsEnvironment().getLocalGraphicsEnvironment().getAllFonts();

notice that also you can see that your special font is available, you might
have to add a reference
to your font in your font.properties file

/Lars Hansen.
"Jacob Møller" <jacob@jvector.dk> wrote in message
news:9hucp6$20cc$1@news.cybercity.dk...
>
> "somez72" <somez72@chollian.net> wrote in message
> news:9hti6t$ii1$1@news1.kornet.net...
> > Hi,all
> >
> > to get fonts available in a system,how can I do?
> > what function can I use to get font set in Java?
> >
>
> Look in java.awt.Toolkit for:
>
> getFontList()
>
> -Jacob
> www.kiloo.dk
>
>
>



Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408847
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste