はじめに ここではDXライブラリでフォントファイル(.ttfなど)をWindowsにインストールせずそのまま利用する方法を紹介する。この方法では既存のDXライブラリにある文字列描画関数をそのまま利用する事ができる。 目次 背景 準備 方法 仕組み まとめ 参考 背景バージョン3.00eのDXライブラリでは、文字列描画に使用するフォントを変更する手段として2種類の関数が用意されている。1つはChangeFont関数、もう1つはCreateFontToHandle関数だ。 しかし、通常これらの関数で指定できるフォントはWindowsにインストールされたフォントのみである。そのため、DXライブラリユーザ*1側で用意したフォントを使用するためには一工夫必要だ。 準備以下の環境で正しく動作するのを確認した。 動作環境 Windows XP SP3 開発環境 Visual Studio 2008 Pr