# Codename One FontBox Update Enables Stroked, Filled, and Scaled Text

DevFeed: [Codename One FontBox Update Enables Stroked, Filled, and Scaled Text](<https://devfeed.tech/articles/cool-text-effects-for-your-mobile-app-on-iphone-ios-android-etc-19270.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/cool-text-effects-mobile-app-phone-ios-android/>)

Author: Steve Hannah

Published: 2016-11-09T00:00:00Z

Content type: article

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Font](<https://devfeed.tech/topics/font.md>), [Library](<https://devfeed.tech/topics/library.md>), [Java](<https://devfeed.tech/topics/java.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [fonts](<https://devfeed.tech/tags/fonts.md>), [java](<https://devfeed.tech/tags/java.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>)

## AI overview

The article describes an update to the FontBox library for Codename One. The new TTFFont class can be used where standard fonts are used and supports filled, stroked, and scaled text, including loading TTF files from several sources. Because it renders text as shapes, it is slower than built-in fonts.

## Source excerpt

FontBox is a mature java library for loading, manipulating, and rendering fonts in Java. It gives you direct access to the font glyphs so that you can perform effects or transformations on them. A couple of years ago, I ported FontBox to Codename One, but since CN1 didn't yet include support for drawing shapes, I made it dependent upon the CN1Pisces library, which did support drawing shapes. This was cool but it had some major limitations; the main one being that FontBox fonts could only be used to draw strings on Pisces graphics contexts, which can only be rendered to an image - not directly to the screen. This meant that you couldn't just use a FontBox font in your app (e.g. in a label or a button). You could only use it to write on an image.