• Stars
    star
    643
  • Rank 70,000 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 11 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

FBGlowLabel

Label UI which supports glow effect
Objective-C
357
star
2

objc-geohash

Objective-C GeoHash Library
Objective-C
129
star
3

WebAuthnKit-iOS

WebAuthn iOS Library
Swift
91
star
4

riverside

Elixir Library: Simple WebSocket Server Framework
Elixir
85
star
5

sinatra-formkeeper

Sinatra Extension which support stuff around HTML forms
Ruby
50
star
6

cpp-cryptlite

C++ library that supports base64-encoding, sha1/sha256 hashing, and hmac calculation
C++
47
star
7

libgeohash

GeoHash C Library
C
32
star
8

redlock

Elixir Library: Redis Distributed Lock implementation
Elixir
29
star
9

p5-oauth-lite2

Perl Library for OAuth 2.0
Perl
24
star
10

WebAuthnKit-Android

WebAuthn Android Library
Kotlin
22
star
11

goidc

Golang OpenID Connect Provider Framework
Go
19
star
12

ruby-atomutil

Ruby AtomPub client
Ruby
17
star
13

the_end

Elixir Library: provides a graceful shutdown support for your Phoenix, or plain Plug application
Elixir
16
star
14

p5-oauth-lite

Perl OAuth Library
Perl
16
star
15

p5-net-opensocial-client

opensocial perl client
Perl
16
star
16

cpp-urilite

C++ uri handler(encode, decode, parse and build)
C
15
star
17

as3crypto_patched

Patched version of as3crypto (ActionScript)
ActionScript
15
star
18

cpp-datetimelite

C++ library for parsing datetime formatted string
C
13
star
19

linebot

Golang LINE Bot Application Framework
Go
12
star
20

p5-openid-lite

openid
Perl
11
star
21

aws_ex_ray

Elixir Library: AWS X-Ray client
Elixir
11
star
22

as3xmppclient

ActionScript 3.0 XMPP client library
ActionScript
9
star
23

as3jcode

japanese text encoding
ActionScript
9
star
24

objc-atompub

AtomPub for Objective-C
8
star
25

formkeeper

ruby library which support stuff around HTML forms
Ruby
8
star
26

FBGlowView

This library provides glowing effect to your own view class
Objective-C
6
star
27

theta-plugin-sora-experimental

THETA V PluginでWebRTC SFU Soraを使えるようにした叩き台
Java
5
star
28

as3saxparser

XML SAX Parser for ActionScript3
ActionScript
5
star
29

easyrtc

Android WebRTC library
Java
4
star
30

MaskHelperForNGUIAtlas

This code helps you to support compressed (and not dirty) textures with Unity/NGUI
C
4
star
31

as3emojitext

TextArea which includes some Emoji characters
ActionScript
4
star
32

p5-pod-projectdocs

Perl documentation tool - generates CPAN like pod pages
Perl
4
star
33

cpp-jsonlite

This is a C++ library which provides you a simple way to build JSON formatted string
C
4
star
34

as3oauth

ActionScript 3.0 OAuth Client Library
ActionScript
4
star
35

roulette

Elixir Library: Hash-Ring-ed gnatsd-cluster client
Elixir
4
star
36

javascript-tagcloud

JavaScript TagCloud Engine
4
star
37

as3mixivoice

ActionScript 3.0 mixi voice client library
ActionScript
3
star
38

javascript-ratingstars

JavaScript RatingStars Engine
3
star
39

p5-oauth-lite-wrap-client

OAuth WRAP perl client library
Perl
3
star
40

p5-cpp-package-starter

helper for building C++ package template that depends on CMake and google-test
Perl
3
star
41

as3tinysegmenter

TinySegmenter for ActionScript3
3
star
42

p5-formvalidator-simple

deprecated
Perl
3
star
43

p5-openid-lite-extension-ax

Attribute Exchange extension for OpenID-Lite
Perl
3
star
44

go-appengine-boilerplate

My Boilerplate for Golang AppEngine project
Go
2
star
45

goformkeeper

golang html form fields validation, filter, error message handling
Go
2
star
46

objc-NSDate-SocialAPI

NSDate category to handle format used in social services' API
Objective-C
2
star
47

p5-openid-lite-extension-ui

UI extension for OpenID-Lite
Perl
2
star
48

formkeeper-japanese

formkeeper's plugin which provides japanese specific filters and validators
Ruby
2
star
49

myenv

My VIM setting with ansible
Shell
2
star
50

p5-Authen-SASL-Server

Perl SASL Authenticator for Server Side (Pure Perl)
Perl
2
star
51

as3urlshortener

as3 library that provides you a easy way to handle URL shortener service such like bit.ly or tinyurl
ActionScript
2
star
52

FBNoiseView

iOS view class which supports noise effect
Objective-C
2
star
53

as3saslclient

SASL client for ActionScript3
ActionScript
2
star
54

as3atompub

Atom Feed Parser/Builder and AtomPub protocol client for ActionScript3
2
star
55

p5-openid-lite-extension-oauth

OAuth extension for OpenID-Lite
Perl
2
star
56

p5-utf8bom

perl UTF8 BOM inserter/stripper
Perl
2
star
57

as3ircclient

ActionScript3.0 IRC client library
ActionScript
2
star
58

as3twittertext

ActionScript 3.0 version of twitter-text library(extractor/auto-linker)
ActionScript
2
star
59

p5-JS-Package-Starter

Generate JS package template for me.
Perl
2
star
60

LKDoubleTapPanGestureRecognizer

gesture recognizer which supports double-tap-pan (like google-maps-ios)
Objective-C
1
star
61

as3oembed

oEmbed library for ActionScript3
ActionScript
1
star
62

as3email

ActionScript3.0 Library supports MIME, POP3, SMTP
ActionScript
1
star
63

sora-labo-uwp-demo

Sora Labo UWP Demo Application
C#
1
star
64

my-electron-boilerplate

My Electron Project Boilerplate
HTML
1
star
65

mouthpiece

Android Simple BLE API Wrapper
Java
1
star
66

throttle

just for my test "too many request" situation
Elixir
1
star
67

udpbench

Rust UDP echo server and client
Rust
1
star
68

lyokato.github.com

lyokato page
1
star
69

objc-PXListView-TextHeight

PXListView Category to calculate height of row including variable text
Objective-C
1
star
70

aws_ex_ray_ex_aws

Elixir Library : ExAws support for aws_ex_ray
Elixir
1
star
71

p5-openid-lite-extension-sreg

SREG extension for OpenID-Lite
Perl
1
star
72

as3googletranslate

ActionScript 3.0 Google Translate Client Library
ActionScript
1
star
73

objc-NSTextView-TwitterEntity

NSTextView Category to handle TwitterEntity
Objective-C
1
star
74

sideshow

WebRTC MediaSoup Playground
JavaScript
1
star
75

objc-NSString-Hyperlink

NSString Category for Hyperlink extraction
Objective-C
1
star
76

p5-openid-lite-extension-pape

PAPE extension for OpenID-Lite
Perl
1
star