Check-in [5322fb3e47]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Pick up circle definition as improved for the punched paper tape font. Adjust Makefile to have sensible targets, and to build TTF files for each demo font by default.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5322fb3e47d7519bffe324eb22b0668b399f6d67
User & Date: Ross 2016-03-10 21:22:02
Context
2016-03-15
00:02
Add table overrides, add ASCII aliases, fix typos, fix character orientation to match paper tape specification, and add tape edge lines. check-in: f19c56a4b9 user: Ross tags: trunk
2016-03-10
21:22
Pick up circle definition as improved for the punched paper tape font. Adjust Makefile to have sensible targets, and to build TTF files for each demo font by default. check-in: 5322fb3e47 user: Ross tags: trunk
21:06
Punched paper tape font, fed starting from left, with bit 0 at the top edge. Set at 72 point for approximately 100% scale of real paper tape. check-in: 3eea976223 user: Ross tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/Makefile.

1
2
3


4
5
6
7
8
9
10
all: dots.ttf dots.pdf





%.ttf: %.ttx
	ttx -f -o $@ $^

%.pdf: %.tex
	lualatex --interaction=nonstopmode $*.tex 
	lualatex --interaction=batchmode $*.tex
|

<
>
>







1
2

3
4
5
6
7
8
9
10
11
all: sevensegment.ttf fivebyseven.ttf papertape.ttf


%.ttx: %.dotfont
	lua dotfonter.lua --verbose $*

%.ttf: %.ttx
	ttx -f -o $@ $^

%.pdf: %.tex
	lualatex --interaction=nonstopmode $*.tex 
	lualatex --interaction=batchmode $*.tex

Changes to src/fivebyseven.dotfont.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49


50


51
52
53
54
55
56
57
--[[ 
#Five by Seven Dot Matrix for dotfonter
--]]

--[[
#License
Copyright (C) 2015 Cheshire Engineering Corp.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
................................................................................
dot pitch of 128 units, the 5x7 dot bounding box is 640x896 units.

We'll draw a dot as a nearly circular blob filling a little less 
than 60% of the available area, or fitting in a 110 units square. 
That will leave about 18 units between dots.

]]
local dot = {
    {  9,  64, 1},
    { 13,  13, 0},
    { 64,   9, 1},
    {115,  13, 0},
    {119,  64, 1},
    {115, 115, 0},
    { 64, 119, 1},
    { 13, 115, 0},


}


local function dotat(r,c)
    local t={}
    for i=1,#dot do
        t[i] = { dot[i][1]+c*128, dot[i][2]+r*128, dot[i][3] }
    end
    return t
end






|







 







|
|
|
|
|
|
|
|
|
>
>
|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--[[ 
#Five by Seven Dot Matrix for dotfonter
--]]

--[[
#License
Copyright (C) 2016 Cheshire Engineering Corp.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
................................................................................
dot pitch of 128 units, the 5x7 dot bounding box is 640x896 units.

We'll draw a dot as a nearly circular blob filling a little less 
than 60% of the available area, or fitting in a 110 units square. 
That will leave about 18 units between dots.

]]
local function circle(r,cx,cy)
    local rc = math.ceil(r*0.91)
    return {
        {cx-r,  cy,    1},
        {cx-rc, cy+rc, 0},
        {cx,    cy+r,  1},
        {cx+rc, cy+rc, 0},
        {cx+r,  cy,    1},
        {cx+rc, cy-rc, 0},
        {cx,    cy-r,  1},
        {cx-rc, cy-rc, 0}
    }
end
local dot = circle(55, 64, 64)
local function dotat(r,c)
    local t={}
    for i=1,#dot do
        t[i] = { dot[i][1]+c*128, dot[i][2]+r*128, dot[i][3] }
    end
    return t
end