bin2x2grid_rough

Share:
by dpla
See also bin2x2grid_safe by dpla.

Download disabled

The designer of this FontStruction has chosen not to make it available for download from this website by choosing an “All Rights Reserved" license.

Please respect their decision and desist from requesting license changes in the comments.

If you would like to use the FontStruction for a specific project, you may be able to contact the designer directly about obtaining a license.

Info: Created on 6th May 2013 . Last edited on 6th May 2013.
License Creative Commons
Categories:
Tags:
Fave Tags:

2 Comments

Sorry, I don't understand it
Comment by Isaac González (1saac) 7th May 2013
@1saac :


Hi !

'bin' abbreviates 'binary' ;
'grid' = array, or matrix…

It's some kind of 'UNIVERSAL 2X2 FONT MAKER'… :-))
(It may be the first time we see this simple stuff…)

Actually, it cannot be read like that ! :-)
You have to **select** the glyphs from it ;-)

Imagine all the possible forms of any character…
That's what displays this 'font', limited to 2x2 ones…

In 2x2, it looks like in my avatar (2x3 chrs)…
Of course, subpixel renders are offtopic,
since you like them crisp and 1-bit only !-)



HOW-TO :
http://fontstruct.com/fontstructions/show/bin3x3grid_safe

---

More specific help with this size of grid.
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨

In 'bin2x2grid_rough' you have a grid of 2x2 (pixels)…

Here's the diagram :
??
??
(Where "?" stands for 1 pixel, be it black, or white.)

This 'font' just shows all the binary ('bin') possibilities from this grid,
which are big-endian encoded as 2x2 = 4 bits = 16 unfiltered possibilities.

E.g. if you need to draw '/' (even 's') in this 2x2 grid :
.X
X.
("X" stands for 1 pixel ; "." for a blank)…

You'll have to encode it into binary :
01
10
("1" = pixel on ; "0" = pixel off")

Then you get the (4-bit) binary value of your desired glyph :
0110

Next you need to match this number with the UNICODE Code Point…

I'll use the derived 'safe font' to be exhaustive :
http://fontstruct.com/fontstructions/show/bin2x2grid_safe


MY MAPPING (16 glyphs from a 2x2 grid)
~~~~~~~~~~

UNICODE map of glyphs in this 2x2 'font'
{tip : display it with a monospace font}

'*' = Discarded (32 non displayable)
'.' = Invalid (3 horiz. duplicate[s])
'X' = Valid glyph (13 chr in all)
'-' = Unused (beyond the 16th chr)

C0 Controls and Basic Latin :
**************** = 000d-015d = 000-00F
**************** = 016d-031d = 010-01F
X...X.XX......XX = 032d-047d = 020-02F
---------------- = 048d-063d = 030-03F


Now that you have your x binary version of your glyph,
here is the magic formula to map it to this 'font' :
UNICODE Code Point = x + 32

Knowing that x = "0110", you can use a calculator :
(e.g. Calc.exe in Windows - Programmer mode, next copy and paste)
x = 110 in binary
x = 6 in decimal
Now the calculation of the mapping in decimal :
x = x + 32 = 6 + 32 = 38
Finally, the hexadecimal conversion (still in a calculator) :
38 dec. = 26 hex.
And you have the UNICODE Code Point of this glyph in this 'font' :
U+0026

It's all about logic, since I put all the glyphs one after the other in the UNICODE order…

Well, tell me if this make more sense to you now…

… OK, not yet ?

Another example, then… :-/

Let's write this text using this 2x2 'font' :
“I'm so lazy... The quick brown fox jumps over the lazy dog”

1. Draw the characters out of this grid…
/!\ There are duplicates in the glyphs, but I managed to fool the viewer by displaying none in //individual// words. If you need to design a 2x2 font, you'll have to add alternate glyphs to reproduce this simple trick…

(Sorry about the long message ; FS does not displays as monospace…)

??
?? “

??
?? I

??
?? '

??
?? m

??
??

??
?? s

??
?? o

??
??

??
?? l

??
?? a

??
?? z

??
?? y

??
?? .

??
?? .

??
?? .

??
??

??
?? T

??
?? h

??
?? e

??
??

??
?? q

??
?? u

??
?? i

??
?? c

??
?? k

??
??

??
?? b

??
?? r

??
?? o

??
?? w

??
?? n

??
??

??
?? f

??
?? o

??
?? x

??
??

??
?? j

??
?? u

??
?? m

??
?? p

??
?? s

??
??

??
?? o

??
?? v

??
?? e

??
?? r

??
??

??
?? t

??
?? h

??
?? e

??
??

??
?? l

??
?? a

??
?? z

??
?? y

??
??

??
?? d

??
?? o

??
?? g

??
?? ”


Could you do it ?
Anyway, I go on…

XX
.. “

X.
X. I

X.
.. '

..
XX m

..
..

.X
X. s

XX
XX o

..
..

X.
XX l

XX
.X a

.X
XX z

XX
X. y

..
X. .

..
X. .

..
X. .

..
..

XX
.X T

X.
XX h

XX
X. e

..
..

XX
.X q

.X
XX u

X.
X. i

X.
.X c

X.
XX k

..
..

X.
XX b

XX
X. r

XX
XX o

.X
XX w

XX
.X n

..
..

XX
X. f

XX
XX o

.X
XX x

..
..

.X
XX j

X.
XX u

XX
.X m

XX
X. p

.X
X. s

..
..

XX
XX o

.X
XX v

X.
XX e

XX
X. r

..
..

XX
.X t

X.
XX h

XX
X. e

..
..

X.
XX l

XX
X. a

.X
XX z

XX
.X y

..
..

.X
XX d

XX
XX o

XX
.X g

XX
.. ”


Now I gather the dummy (drawing/temporary) chrs together :

0.

“I'm so lazy... The quick brown fox jumps over the lazy dog”

1.

“I'm so la
zy... The
quick brow
n fox jump
s over the
lazy dog”

2.

[“][I]['][m][ ] [s][o][ ][l][a]
[z][y][.][.][.] [ ][T][h][e][ ]
[q][u][i][c][k] [ ][b][r][o][w]
[n][ ][f][o][x] [ ][j][u][m][p]
[s][ ][o][v][e] [r][ ][t][h][e]
[ ][l][a][z][y] [ ][d][o][g][”]

3.

[““][II][''][mm][ ] [ss][oo][ ][ll][aa] (Top #1)
[““][II][''][mm][ ] [ss][oo][ ][ll][aa] (Btm #1)

[zz][yy][..][..][..] [ ][TT][hh][ee][ ] (Top #2)
[zz][yy][..][..][..] [ ][TT][hh][ee][ ] (Btm #2)

[qq][uu][ii][cc][kk] [ ][bb][rr][oo][ww] (Top #3)
[qq][uu][ii][cc][kk] [ ][bb][rr][oo][ww] (Btm #3)

[nn][ ][ff][oo][xx] [ ][jj][uu][mm][pp] (Top #4)
[nn][ ][ff][oo][xx] [ ][jj][uu][mm][pp] (Btm #4)

[ss][ ][oo][vv][ee] [rr][ ][tt][hh][ee] (Top #5)
[ss][ ][oo][vv][ee] [rr][ ][tt][hh][ee] (Btm #5)

[ ][ll][aa][zz][yy] [ ][dd][oo][gg][””] (Top #6)
[ ][ll][aa][zz][yy] [ ][dd][oo][gg][””] (Btm #6)

4.

[XX][X.][X.][..][..] [.X][XX][..][X.][XX] (Top #1)
[..][X.][..][XX][..] [X.][XX][..][XX][.X] (Btm #1)

[.X][XX][..][..][..] [..][XX][X.][XX][..] (Top #2)
[XX][X.][X.][X.][X.] [..][.X][XX][X.][..] (Btm #2)

[XX][.X][X.][X.][X.] [..][X.][XX][XX][.X] (Top #3)
[.X][XX][X.][.X][XX] [..][XX][X.][XX][XX] (Btm #3)

[XX][..][XX][XX][.X] [..][.X][X.][XX][XX] (Top #4)
[.X][..][X.][XX][XX] [..][XX][XX][.X][X.] (Btm #4)

[.X][..][XX][.X][X.] [XX][..][XX][X.][XX] (Top #5)
[X.][..][XX][XX][XX] [X.][..][.X][XX][X.] (Btm #5)

[..][X.][XX][.X][XX] [..][.X][XX][XX][XX] (Top #6)
[..][XX][X.][XX][.X] [..][XX][XX][.X][..] (Btm #6)


Binary fun ! (Chrs replacements into digits)

[11][10][10][00][00] [01][11][00][10][11] (Top #1)
[00][10][00][11][00] [10][11][00][11][01] (Btm #1)

[01][11][00][00][00] [00][11][10][11][00] (Top #2)
[11][10][10][10][10] [00][01][11][10][00] (Btm #2)

[11][01][10][10][10] [00][10][11][11][01] (Top #3)
[01][11][10][01][11] [00][11][10][11][11] (Btm #3)

[11][00][11][11][01] [00][01][10][11][11] (Top #4)
[01][00][10][11][11] [00][11][11][01][10] (Btm #4)

[01][00][11][01][10] [11][00][11][10][11] (Top #5)
[10][00][11][11][11] [10][00][01][11][10] (Btm #5)

[00][10][11][01][11] [00][01][11][11][11] (Top #6)
[00][11][10][11][01] [00][11][11][01][00] (Btm #6)


Let's get the binary numbers by merging both parts :

[1100] [1010] [1000] [0011] [0000] (Top&Btm #1 l.)
[0110] [1111] [0000] [1011] [1101] (Top&Btm #1 r.)
[0111] [1110] [0010] [0010] [0010] (Top&Btm #2 l.)
[0000] [1101] [1011] [1110] [0000] (Top&Btm #2 r.)
[1101] [0111] [1010] [1001] [1011] (Top&Btm #3 l.)
[0000] [1011] [1110] [1111] [0111] (Top&Btm #3 r.)
[1101] [0000] [1110] [1111] [0111] (Top&Btm #4 l.)
[0000] [0111] [1011] [1101] [1110] (Top&Btm #4 r.)
[0110] [0000] [1111] [0111] [1011] (Top&Btm #5 l.)
[1110] [0000] [1101] [1011] [1110] (Top&Btm #5 r.)
[0000] [1011] [1110] [0111] [1101] (Top&Btm #6 l.)
[0000] [0111] [1111] [1101] [1100] (Top&Btm #6 r.)


Let's delete all the brackets and the garbage info…

1100 1010 1000 0011 0000
0110 1111 0000 1011 1101
0111 1110 0010 0010 0010
0000 1101 1011 1110 0000
1101 0111 1010 1001 1011
0000 1011 1110 1111 0111
1101 0000 1110 1111 0111
0000 0111 1011 1101 1110
0110 0000 1111 0111 1011
1110 0000 1101 1011 1110
0000 1011 1110 0111 1101
0000 0111 1111 1101 1100


… and convert these binary numbers into decimal :

1100 1010 1000 0011 0000 = 12 10 08 03 00 ;
0110 1111 0000 1011 1101 = 06 15 00 11 13 ;
0111 1110 0010 0010 0010 = 07 14 02 02 02 ;
0000 1101 1011 1110 0000 = 00 13 11 14 00 ;
1101 0111 1010 1001 1011 = 13 07 10 09 11 ;
0000 1011 1110 1111 0111 = 00 11 14 15 07 ;
1101 0000 1110 1111 0111 = 13 00 14 15 07 ;
0000 0111 1011 1101 1110 = 00 07 11 13 14 ;
0110 0000 1111 0111 1011 = 06 00 15 07 11 ;
1110 0000 1101 1011 1110 = 14 00 13 11 14 ;
0000 1011 1110 0111 1101 = 00 11 14 07 13 ;
0000 0111 1111 1101 1100 = 00 07 15 13 12 .


We're ready to find out their UNICODE Code Points :
(read again the § Mapping to understand "+32"…)

a. Let's shift the binary value :
12+32 ; 10+32 ; 08+32 ; 03+32 ; 00+32 ;
06+32 ; 15+32 ; 00+32 ; 11+32 ; 13+32 ;
07+32 ; 14+32 ; 02+32 ; 02+32 ; 02+32 ;
00+32 ; 13+32 ; 11+32 ; 14+32 ; 00+32 ;
13+32 ; 07+32 ; 10+32 ; 09+32 ; 11+32 ;
00+32 ; 11+32 ; 14+32 ; 15+32 ; 07+32 ;
13+32 ; 00+32 ; 14+32 ; 15+32 ; 07+32 ;
00+32 ; 07+32 ; 11+32 ; 13+32 ; 14+32 ;
06+32 ; 00+32 ; 15+32 ; 07+32 ; 11+32 ;
14+32 ; 00+32 ; 13+32 ; 11+32 ; 14+32 ;
00+32 ; 11+32 ; 14+32 ; 07+32 ; 13+32 ;
00+32 ; 07+32 ; 15+32 ; 13+32 ; 12+32 .

b. Let's calculate it…
i. You can copy'n'paste each calculation in Calc.exe :
(but I bet you'll be quicker using your brain here !)
12+32= ; 10+32= ; 08+32= ; 03+32= ; 00+32= ;
06+32= ; 15+32= ; 00+32= ; 11+32= ; 13+32= ;
07+32= ; 14+32= ; 02+32= ; 02+32= ; 02+32= ;
00+32= ; 13+32= ; 11+32= ; 14+32= ; 00+32= ;
13+32= ; 07+32= ; 10+32= ; 09+32= ; 11+32= ;
00+32= ; 11+32= ; 14+32= ; 15+32= ; 07+32= ;
13+32= ; 00+32= ; 14+32= ; 15+32= ; 07+32= ;
00+32= ; 07+32= ; 11+32= ; 13+32= ; 14+32= ;
06+32= ; 00+32= ; 15+32= ; 07+32= ; 11+32= ;
14+32= ; 00+32= ; 13+32= ; 11+32= ; 14+32= ;
00+32= ; 11+32= ; 14+32= ; 07+32= ; 13+32= ;
00+32= ; 07+32= ; 15+32= ; 13+32= ; 12+32= .

ii. Once you have replaced them all, you should get :
44 ; 42 ; 40 ; 35 ; 32 ; (= "“I'm ")
38 ; 47 ; 32 ; 43 ; 45 ; (= "so la")
39 ; 46 ; 34 ; 34 ; 34 ; (= "zy...")
32 ; 45 ; 43 ; 46 ; 32 ; (= " The ")
45 ; 39 ; 42 ; 41 ; 43 ; (= "quick")
32 ; 43 ; 46 ; 47 ; 39 ; (= " brow")
45 ; 32 ; 46 ; 47 ; 39 ; (= "n fox")
32 ; 39 ; 43 ; 45 ; 46 ; (= " jump")
38 ; 32 ; 47 ; 39 ; 43 ; (= "s ove")
46 ; 32 ; 43 ; 43 ; 46 ; (= "r the")
32 ; 43 ; 46 ; 39 ; 45 ; (= " lazy")
32 ; 39 ; 47 ; 45 ; 44 . (= " dog”")

iii. Dec. to Hex. conversions reveal the Code Points :
(you can resort to e.g. MS Excel 'DECHEX' function)
2C 2A 28 23 20 (= "“I'm ")
26 2F 20 2B 2D (= "so la")
27 2E 22 22 22 (= "zy...")
20 2D 2B 2E 20 (= " The ")
2D 27 2A 29 2B (= "quick")
20 2B 2E 2F 27 (= " brow")
2D 20 2E 2F 27 (= "n fox")
20 27 2B 2D 2E (= " jump")
26 20 2F 27 2B (= "s ove")
2E 20 2B 2B 2E (= "r the")
20 2B 2E 27 2D (= " lazy")
20 27 2F 2D 2C (= " dog”").

iv. Optionally, you can check as "before = after" :
“I'm so la = 2C 2A 28 23 20 26 2F 20 2B 2D
zy... The = 27 2E 22 22 22 20 2D 2B 2E 20
quick brow = 2D 27 2A 29 2B 20 2B 2E 2F 27
n fox jump = 2D 20 2E 2F 27 20 27 2B 2D 2E
s over the = 26 20 2F 27 2B 2E 20 2B 2B 2E
lazy dog” = 20 2B 2E 27 2D 20 27 2F 2D 2C


5. Copy and paste the 2x2 characters :
(e.g. in BabelMap, use the Hex. values as Code Points)
“I'm so la = , * ( # & / + -
zy... The = ' . " " " - + .
quick brow = - ' * ) + + . / '
n fox jump = - . / ' ' + - .
s over the = & / ' ' . - + .
lazy dog” = + . ' - ' / - ,

Remove the useless spaces from the output :
“I'm so la = ,*(# &/ +-
zy... The = '.""" -+.
quick brow = -'*)+ +./'
n fox jump = - ./' '+-.
s over the = & /''. -+.
lazy dog” = +.'- '/-,

Concatenate the in and out strings :
“I'm so lazy... The quick brown fox jumps over the lazy dog”
,*(# &/ +-'.""" -+. -'*)+ +./'- ./' '+-.& /'+. -+. +.'- '/-,


6.
Copy and paste the output line above in the FS previewer ;
You'll get the image below.

CYA,
dpla
Comment by dpla 8th May 2013