Unit CastleWinFontConvert

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Convert fonts available on Windows to TBitmapFont and TOutlineFont.

This unit heavily depends on GetGlpyhOutline WinAPI function. This function is our "core" of converting Windows fonts to TBitmapFont or TOutlineFont. Unfortunately, this makes this unit Windows-only forever. In the future I plan to write some similiar unit, but portable. Probably using FreeType2 library.

Uses

Overview

Functions and Procedures

function Font2BitmapFont(WinFont: HFont): TBitmapFont;
function Font2OutlineFont(WinFont: HFont): TOutlineFont;
procedure FreeAndNilFont(var Font: TBitmapFont); overload;
procedure FreeAndNilFont(var Font: TOutlineFont); overload;

Description

Functions and Procedures

function Font2BitmapFont(WinFont: HFont): TBitmapFont;

Create our font from a Windows font handle. Remeber to free resulting font later by FreeAndNilFont.

function Font2OutlineFont(WinFont: HFont): TOutlineFont;
 
procedure FreeAndNilFont(var Font: TBitmapFont); overload;

Free and nil Font instance, freeing also all characters by FreeMem. Use this only on fonts with characters created by Font2BitmapFont / Font2OutlineFont.

procedure FreeAndNilFont(var Font: TOutlineFont); overload;
 

Generated by PasDoc 0.13.0 on 2013-08-17 21:27:15