Click here to Skip to main content
15,897,187 members
Articles / Multimedia / GDI+

How to Use a Font Without Installing it

Rate me:
Please Sign up or sign in to vote.
4.93/5 (58 votes)
12 Apr 2016CPOL7 min read 201.8K   7.5K   185  
How to use a font without installing it first on user systems
// TestGDIPlus_AddFontFile.h : main header file for the PROJECT_NAME application
//

#pragma once

#ifndef __AFXWIN_H__
	#error "include 'stdafx.h' before including this file for PCH"
#endif

#include "resource.h"		// main symbols


// CTestGDIPlus_AddFontFileApp:
// See TestGDIPlus_AddFontFile.cpp for the implementation of this class
//

class CTestGDIPlus_AddFontFileApp : public CWinApp
{
public:
	CTestGDIPlus_AddFontFileApp();
	~CTestGDIPlus_AddFontFileApp();

private:
	Gdiplus::GdiplusStartupInput m_gdiplusStartupInput;
	ULONG_PTR m_gdiplusToken;

// Overrides
	public:
	virtual BOOL InitInstance();

// Implementation

	DECLARE_MESSAGE_MAP()
};

extern CTestGDIPlus_AddFontFileApp theApp;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Shao Voon is from Singapore. His interest lies primarily in computer graphics, software optimization, concurrency, security, and Agile methodologies.

In recent years, he shifted focus to software safety research. His hobby is writing a free C++ DirectX photo slideshow application which can be viewed here.

Comments and Discussions