Skip to content
Projects

lyokato/FBDigitalFont has 638 GitHub stars and 72 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-16 04:29 UTC. Last push 2015-11-17.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

This library includes some kind of digital fonts (not TTF or something, just CoreGraphics drawing)

Creative & Media

README.md

Original

FBDigitalFont

Example

This library includes some kind of digital styled font drawer. They're not TTF files or something. They just draw fonts with CoreGraphics. So, you don't need to worry about redistribution license of font files when you release your application.

Example

Bitmap Font

BitmapFont

supporting

A-Z, 0-9, !:

LCD Font

LCDFont

supporting

0-9, dash

Square Font

SquareFont

supporting

A-Z, 0-9, dash

GLOWING EFFECT

I guess this kind of fonts have high affinity to glowing effects. So I support same effect as FBGlowLabel.

All you have to do is to set 4 properties.

  • glowColor
  • innnerGlowColor
  • glowSize
  • innerGlowSize

SETTING UP

If you use CocoaPods, add the following line to your Podfile

pod 'FBDigitalFont'

or directly git clone or download from this page.

IMPLEMENTATION

This includes some UIView classes which is customized to handle these fonts easily.

  • FBBitmapFontView
  • FBLCDFontView
  • FBSquareFontView

Or If you want, you can directly use drawer classes.

  • FBBitmapFont
  • FBLCDFont
  • FBSquareFont

Each of view classes require you to call resetSize method after modified properties to adjust view size according to modified parameters. Don't forget about this.

FBBitmapFontView

#import <FBDigitalFont/FBBitmapFontView.h>

- (void)setupBitmapFontView
{
    CGRect frame = CGRectMake(10, 60, 300, 50);
    FBBitmapFontView *v = [[FBBitmapFontView alloc] initWithFrame:frame];
    v.text = @"BITMAP";
    v.numberOfBottomPaddingDot = 1;
    v.numberOfTopPaddingDot    = 1;
    v.numberOfLeftPaddingDot   = 2;
    v.numberOfRightPaddingDot  = 2;
    v.glowSize = 20.0;
    v.innerGlowSize = 3.0;
    v.edgeLength = 5.0;
    [self.view addSubview:v];
    [v resetSize];
}
  • dotType
  • edgeLength
  • margin
  • numberOfLeftPaddingDot
  • numberOfTopPaddingDot
  • numberOfRightPaddingDot
  • numberOfBottomPaddingDot
  • numberOfPaddingDotWithinDigits numberOfPaddingDotsBetweenDigits
  • offColor
  • onColor
  • glowColor
  • innerGlowColo
  • glowSize
  • innerGlowSize
  • text

BitmapFontDescription

FBLCDFontView

#import <FBDigitalFont/FBLCDFontView.h>

- (void)setupLCDFontView
{
    CGRect frame = CGRectMake(40, 150, 300, 50);
    FBLCDFontView *v = [[FBLCDFontView alloc] initWithFrame:frame];
    v.text = @"20141231";
    v.lineWidth = 4.0;
    v.drawOffLine = YES;
    v.edgeLength = 20;
    v.margin = 10.0;
    v.backgroundColor = [UIColor blackColor];
    v.horizontalPadding = 20;
    v.verticalPadding = 14;
    v.glowSize = 10.0;
    v.glowColor = UIColorFromRGB(0x00ffff);
    v.innerGlowColor = UIColorFromRGB(0x00ffff);
    v.innerGlowSize = 3.0;
    [self.view addSubview:v];
    [v resetSize];
}
  • drawOffLine
  • edgeLength
  • margin
  • lineWidth
  • horizontalPadding
  • verticalPadding
  • glowSize
  • innerGlowSize
  • lineColor
  • offColor
  • glowColor
  • innerGlowColor
  • text

LCDFontDescription

FBSquareFontView

#import <FBDigitalFont/FBSquareFontView.h>

- (void)setupSquareFontView
{
    CGRect frame = CGRectMake(10, 240, 300, 50);
    FBSquareFontView *v = [[FBSquareFontView alloc] initWithFrame:frame];
    v.text = @"SQUARE";
    v.lineWidth = 3.0;
    v.lineCap = kCGLineCapRound;
    v.lineJoin = kCGLineJoinRound;
    v.margin = 12.0;
    v.backgroundColor = [UIColor blackColor];
    v.horizontalPadding = 30;
    v.verticalPadding = 14;
    v.glowSize = 10.0;
    v.glowColor = UIColorFromRGB(0x00ffff);
    v.innerGlowColor = UIColorFromRGB(0x00ffff);
    v.lineColor = UIColorFromRGB(0xffffff); // 0xffdd66
    v.innerGlowSize = 2.0;
    v.verticalEdgeLength = 12;
    v.horizontalEdgeLength = 14;
    [self.view addSubview:v];
    [v resetSize];
}
  • horizontalEdgeLength
  • verticalEdgeLength
  • margin
  • lineWidth
  • horizontalPadding
  • verticalPadding
  • glowSize
  • innerGlowSize
  • lineJoin
  • lineCap
  • lineColor
  • glowColor
  • innerGlowColor
  • text

SEE ALSO

If you don't need digital font but glowing effect, See FBGlowLabel

FBGlowLabelImage

FOR MORE DETAIL

This repository includes demo project, so you can dig into it for more details.