Page 1 of 1

how to use system's font ?

Posted: Wed Jan 19, 2005 08:06
by karmaGfa
Hello,

Someone knows how to use a font present on the current system ? I would like to use the chinese font which is available on all the chinese version of window instead of providing one (too big, and copyright issues perhaps) with my game.

Thank you
--
For the 2005 year, I will not complain anymore about open source projects. :pint:

Re: how to use system's font ?

Posted: Wed Jan 19, 2005 10:28
by CrazyEddie
You simply need to ensure that the path to the font file is specified (or accessible if using a resource manager) when creating the CEGUI::Font. This may mean paths in .xml files, paths in code, or if you're using a resource manager of some kind you just ensure that the fonts path is accessible to that.

This could all be as simple as "%SystemRoot%\Fonts\myFont.ttf", or there could be more complex scenarios.

CE.