Let's Swing!
A globally warmed, Swing focused blog in the Participation Age.
I've definitely moved this blog to my personal site!

Mandelbrot: Update with new fonts

lunes septiembre 05, 2005 | SwingWorker | Permalink | Comentarios [4]

First of all I would like to thank all people posting on the performance improvements of the Mandelbrot Explorer on multicore systems. Jeffrey Olson's tables are indeed impressive (and appreciated. Thanks Jeffrey!!). Regarding the hyperthreading question I assume hyperthreading gains are observable if one of the threads is waiting (for instance in an I/O operation) so the other thread can benefit of the CPU core. Dual core systems are more performant, of course, and true multi-processor ones may be even more performant.

Now, as promised, the newest release of the Mandelbrot explorer...

I think little people know that Java allows you to use custom fonts in your GUIs. Well, most of the time you'd better use the JVM's built-in fonts because you're sure those are UTF-8 fonts. So by using the built-in fonts you are safe with foreign languages and weird symbols.

Anyway there're some exceptions to the rule and Mandelbrot explorer is one of these. I've downloaded a freeware font from the Internet and bundled it in the jar files of the Mandelbrot explorer. A little magic:

URL url = InfoPane.class.getResource("fonts/LCD-U___.TTF");
if ( url != null )
{
try
{
  InputStream input = new BufferedInputStream( url.openStream(), 4*1024 );
  LCDFont = Font.createFont( Font.TRUETYPE_FONT, input ).deriveFont(34.0f);
  input.close();
}
catch( Exception e )
{
  LCDFont = new java.awt.Font("DialogInput", Font.BOLD, 24);
}
}
loads the font for me and I'm all set.

In this new release of the Mandelbrot explorer I've solved some bugs (regarding progress computations), so I think it's safe to release the source code too. It's a little bit more documented than the previous one too. Any questions are welcome.

source and JDK 5.0 Java WebStart demo available as well.

Happy Swinging,
Antonio

Comentarios:

An error occurred while launching/running the application. Title: Mandelbrot Explorer Vendor: Visually explore the Mandelbrot fractal Category: Download Error Unable to load resource: http://blogs.sun.com/roller/resources/swinger/mandelbrot-3.jnlp

Enviado por Alan Burlison en septiembre 05, 2005 a las 11:37 PM CEST #

It's working correctly in this side. Any further details you may provide (such as a JWS Console or something?).

Thanks, Antonio

Enviado por Antonio en septiembre 06, 2005 a las 09:52 AM CEST #

Ah, make sure you're using JDK 5.0 Java Web Start (JDK 1.4.X won't work).

Enviado por Antonio en septiembre 06, 2005 a las 11:11 AM CEST #

Sweet, I'll check the code later, can't wait to see what you did!

Enviado por Jeffrey Olson en septiembre 06, 2005 a las 05:50 PM CEST #

Enviar un comentario:

Los comentarios han sido deshabilitados.

Categories


Search


Recent entries


Sites I find interesing

Aggregators
Swing focused
Software architecture related @ blogs.sun.com

Calendar

« julio 2009
lunmarmiéjueviesábdom
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Hoy

Navigation


Visits

Locations of visitors to this page