Skip to content
elihart edited this page Mar 21, 2013 · 5 revisions

Overview

The FontManager class allows us to collect information on available fonts on the device. This information is used to allow the user to change fonts when adding text to their ad.

This class is Copyright (C) 2011 George Yunaev @ Ulduzsoft

Licensed under the Apache License, Version 2.0 (the "License")

http://www.ulduzsoft.com/2012/01/enumerating-the-fonts-on-android-platform/

Features

This class is used in the FontPickerDialog to show the user which fonts are available for use

Usage:

// Let FontManager find available fonts

HashMap<String, String> fonts = FontManager.enumerateFonts();

// Lists to store the font paths and names

mFontPaths = new ArrayList();

mFontNames = new ArrayList();

// add fonts to List

for (String path : fonts.keySet()) {

mFontPaths.add(path);

mFontNames.add(fonts.get(path));

}

Bugs

Planned Features

Clone this wiki locally