Skip to main content

Client side HUD font resize?

7 replies [Last post]
danthedixonman
Offline
Joined: 2008-05-28
Points: 0

We've been trialling one of Wonderland participants in a large shared display area (ie using a projector) and have found that some of the HUD text is unreadable at the distance we sit. Is it possible to resize the text for particular clients?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nsimpson
Offline
Joined: 2004-06-03
Points: 0

I've experimented with doing this. There are a number of places in the HUD module where you'll need to make changes. I'll send you pointers later today when I'm back in the office. The HUD scale code needs to be consolidated. Perhaps as a workaround I could use an environment variable. I'll look into this since others have asked for this feature too.

Stay tuned,

Nigel

danthedixonman
Offline
Joined: 2008-05-28
Points: 0

Sounds good Nigel - looking forward to it (or pointers to coding it myself in the interim)

nsimpson
Offline
Joined: 2004-06-03
Points: 0

OK, here's how to change the scale of the HUD windows:

The HUD displays Swing components at a scale of 0.75 actual size. The reason for doing this was to keep HUD windows small so that they don't obscure to much of the 3D scene. If you want to change the scale, there are two places you need to do this:

org.jdesktop.wonderland.modules.hud.client.WonderlandHUDComponentManager.java:83:

protected Vector2f hudPixelScale = new Vector2f(0.75f, 0.75f);

and:

org.jdesktop.wonderland.modules.hud.client.HUDView2D.java:120:

frameView.setLocationOrtho(new Vector2f(0.0f, (float) (0.75 * getWindow().getHeight() / 2 + 0.75f * frameImpl.getPreferredSize().height / 2)), false);

Replace 0.75 with the desired scale. So, to make the windows appear actual size, use 1.0. To make them twice the default size, use 1.50. Then rebuild and redeploy the HUD module.

Note that scaling HUD windows larger then 1.0 will cause some blurriness of the text. The scale also affects in-world applications that you display on the HUD. So, if you display a large application such as Firefox on the HUD enlarged, it may be too big to fit.

For 0.5, I'll update the HUD module so that it reads the scale from the user's environment which should suffice until we have a user preferences system in place.

Hope this helps!

Nigel

nsimpson
Offline
Joined: 2004-06-03
Points: 0

Unfortunately, not at the moment. This is on our to-do list once we implement support for user preferences, which is currently a post-0.5 feature.

Nigel

danthedixonman
Offline
Joined: 2008-05-28
Points: 0

If I wanted to code this up myself have you got hints on where I should be looking Nigel?

nsimpson
Offline
Joined: 2004-06-03
Points: 0

I've experimented with doing this. There are a number of places in the HUD module where you'll need to make changes. I'll send you pointers later today when I'm back in the office. The HUD scale code needs to be consolidated. Perhaps as a workaround I could use an environment variable. I'll look into this since others have asked for this feature too.

Stat tuned.

Nigel

nigel_wynne
Offline
Joined: 2009-02-25
Points: 0

we'd find this really useful too!!