RESOURCES file and fonts question

   14001   5   0
User Avatar
Member
3 posts
Joined: July 2005
Offline
Quick question, but while tweaking a /config/resources file, I've often wanted to specify a font beyond those listed and included under $HFS/houdini/fonts, font.index, and the associated $HFS/houdini/fonts_gl directory. Note that this is Houdini 5.x under Windows2000.

Examing the contents of the files in both locations, it appears that the Postscript Font Binary files are located under /fonts for each font and style (the files simply have the usual .PFB stripped off). Under the /fonts_gl directory, where I would assume the associated font metrics files would be placed – usually an .AFM (Adobe Font Metrics) or the binary version .PFM (Postscript Font Metrics) is included with each .PFB – I find what appears to be the metrics file for each font and style at each fontsize, but examining the contents of those binary files leads me to believe that they are not typical .PFM files.

For example, under /fonts is Courier which is specified in the font.index file, and under /fonts_gl you will find Courier.8.bin, Courier.10.bin, and so on.

What I'm looking for is a little clarity, on if indeed the /fonts directory contains the font binaries and the /fonts_gl the metrics. AND what format are those .bin files in?

Thanks for any assist…

————————
User Avatar
Member
1632 posts
Joined: July 2005
Offline
May I know what are you trying to do? Would you like to add more fonts or are you trying to make the GUI font smaller etc?

If you would like to add more fonts, you can use the Font Manager. Launch Houdini, put down a Font SOP & click on the ‘Start Font Manager’ button. With the Font Manager, you can then search/specify the fonts you would like to add. Please remember to check the font.index file for write permissions.

If you would like to make the GUI font smaller, you can use the following Environment Variables:

HOUDINI_OVERRIDE_HEIGHT
HOUDINI_OVERRIDE_WIDTH


You can set them this way:

Right Click on My Computer icon -> Select Properties
Go to the Advanced Tab -> Select Environment Variables
Click the 'New…' button under the User variables
In the pop-up dialog, type in one of the variables above. You can use a value of 370 to begin with. Do the same for the other variable.
Please make sure you click 'OK' for the Environment Variables dialog.

Start a new Houdini session. Voila! 8)

If you don't like what you see, close Houdini & change the values. Same thing, remember to click 'OK' for the Environment Variables dialog before starting Houdini.

I hope I answered your questions!

Have fun!
User Avatar
Member
3 posts
Joined: July 2005
Offline
This isn't essential, obviously just a cosmetic issue I get back to occasionally, but actually making the GUI font smaller and the ability to change the GUI font to something other than the stock fonts is what I'm after.

I wasn't aware of the HOUDINI_OVERRIDE_HEIGHT and HOUDINI_OVERRIDE_WIDTH env. vars…those worked great for the GUI size issue! Must have missed those in the manuals somewhere. THANKS!

Regarding the Font SOP and Font Manager, I've tried those, and what I find each time, is yes I can add a particular font (and even better choose “update font path” to add all the enabled fonts on your system), and it adds them in the associated font.index file. However, it does not update the /fonts directory or the /fonts_gl directory, with any information (I've even tried manually placing fonts there, then using Font Manager to update the font.index file, no difference).

Updating the resources file to use one of the non-stock fonts listed in the updated font.index file, is where I run into a problem. If I choose anything but one of the stock fonts, houdini will launch, but displays no text, obviously because of a problem with displaying the specified font. Which points me back to Houdini not having the appropriate binary and metrics files for that font under /fonts and /fonts_gl. That's why I'm wondering what the specific format of those .bin files are under /fonts_gl. I can generate both the postscript binary outlines for the /fonts directory, and the metrics for whatever font I'm trying to use, but cannot figure out what exactly needs to be under those directories in order to use a non-stock font for the GUI itself specified in the resources file from a valid font.index item.

Thanks again for the env. vars override tip….

—-——–
User Avatar
Member
1632 posts
Joined: July 2005
Offline
Erm… I wouldn't want to mess with the resources files if I were you. Also, you have something against Helvetica, Courier & Terminal fonts? :wink:

To get all the Environment Variables, you can type hconfig -h in a shell. To save them to a file, which you probably want to, type hconfig -h > hconfig.txt.

Adding fonts with the Font Manager will not move them to /fonts or /fonts_gl. The reason why you don't see the fonts even after adding them is Houdini don't know where to find them. You can move the fonts to /fonts & after you start Houdini, you'll see them.

However, the above method is not very efficient. To be truly efficient , you'll use an Environment variable to tell Houdini where are all the fonts you installed. The magic variable is:

HOUDINI_OUTLINEFONT_PATH

Set the value to where your fonts are & separate the paths with a semicolon ( ; ).

I hope the above helps. I didn't answer your question on the .bin files because I don't know anything about them.

Well, good luck!

Cheers!
User Avatar
Staff
6287 posts
Joined: July 2005
Offline
scottwade
This isn't essential, obviously just a cosmetic issue I get back to occasionally, but actually making the GUI font smaller and the ability to change the GUI font to something other than the stock fonts is what I'm after.

I have some good and bad news about Houdini 5.5 then. The bad news is that HOUDINI_OVERRIDE_HEIGHT & WIDTH won't work directly. The good news is that you likely won't need them. The “Giant Font” problem on NT which caused so many to run to the HOUDINI_OVERRIDE variables was caused by Windows reporting everyone's monitor sizes as 12 inches (30 cm). As very few people run 1280x1024 on a 12 inch monitor, we were calculating absurdly high DPI for people's screens. Since our UI is specified in inches rather than pixels, this had the effect of inflating everything.

With Houdini 5.5 we ignore the value returned by Windows entirely, and instead set the DPI to a fixed value (which should match what you see on other platforms). Also, as the HOUDINI_OVERRIDE_* functions were rather obscure in both their use and what values to set them at, the variable HOUDINI_UISCALE was added to provide a one stop scaling factor. A value of 100 is the default 85 dpi. Higher numbers will give larger text, smaller numbers smaller text. A value of -1 will cause it to use teh HOUDINI_OVERRIDE variables if you have something you like already in there.

Which points me back to Houdini not having the appropriate binary and metrics files for that font under /fonts and /fonts_gl. That's why I'm wondering what the specific format of those .bin files are under /fonts_gl. I can generate both the postscript binary outlines for the /fonts directory, and the metrics for whatever font I'm trying to use, but cannot figure out what exactly needs to be under those directories in order to use a non-stock font for the GUI itself specified in the resources file from a valid font.index item.

You are correct you need an appropriatley formatted .bin file for the font. Unfortunately I think we use our own bizarro format. The .bin files are just brute force binary conversion of our ascii font format. And, our ascii font file is, to my knowledge, yet another custom file format.

- Jeff
User Avatar
Member
3 posts
Joined: July 2005
Offline
Thanks for the clarification, Jeff…and the tip about HOUDINI_OUTLINEFONT_PATH, Steven. That's the information I was after, and with those tips, I've gotten at least enough tweaked in my resources file and env. vars to satisfy my curiosity on that issue, and can now get back to actual work :wink:

I haven't had a chance to see/work with Houdini 5.5 yet, but from everything I've been hearing, I'm definetly excited, along with the upcoming Halo (might be an interesting contest if/when Digital Domain unleashes NUKE commercially), and Escape. I'm still coming up to speed withe the great modeling tools in version 5 over 4.

Thanks again for the great tips. And to SideFX for getting the “community” going….

—–———
  • Quick Links