Skip to content

Commit c71c2b7

Browse files
committed
Initial release
0 parents  commit c71c2b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5832
-0
lines changed

.clang-format

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Language: Cpp
2+
AccessModifierOffset: -4
3+
AlignAfterOpenBracket: DontAlign
4+
AllowShortCaseLabelsOnASingleLine: true
5+
AllowShortIfStatementsOnASingleLine: true
6+
AlwaysBreakTemplateDeclarations: Yes
7+
BraceWrapping:
8+
AfterFunction: true
9+
BreakBeforeBraces: Custom
10+
ColumnLimit: 0
11+
IncludeBlocks: Regroup
12+
IncludeCategories:
13+
- Regex: '^<.*\.h>'
14+
Priority: 2
15+
- Regex: '^<.*'
16+
Priority: 3
17+
- Regex: '.*'
18+
Priority: 1
19+
IndentCaseLabels: true
20+
IndentWidth: 4
21+
KeepEmptyLinesAtTheStartOfBlocks: false
22+
MaxEmptyLinesToKeep: 2
23+
NamespaceIndentation: All
24+
PointerAlignment: Left
25+
SpaceAfterCStyleCast: true
26+
SpacesBeforeTrailingComments: 2

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 4
7+
tab_width = 8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.cpp text
2+
*.h text
3+
*.txt text
4+
*.md text
5+
.* text
6+
*.png filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.*'
7+
8+
permissions:
9+
packages: read
10+
contents: write
11+
12+
jobs:
13+
create_release:
14+
name: Create Release
15+
runs-on: ubuntu-latest
16+
17+
outputs:
18+
upload_url: ${{ steps.create_release.outputs.upload_url }}
19+
20+
steps:
21+
- name: Create Release
22+
id: create_release
23+
uses: actions/create-release@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
tag_name: ${{ github.ref }}
28+
release_name: Release ${{ github.ref }}
29+
draft: false
30+
prerelease: false
31+
32+
release_assets:
33+
name: Release Assets
34+
needs: create_release
35+
runs-on: ${{ matrix.os }}
36+
37+
strategy:
38+
matrix:
39+
os: [ubuntu-latest, windows-latest]
40+
build_type: [Release]
41+
cpp_compiler: [g++-13, cl]
42+
include:
43+
- os: windows-latest
44+
cpp_compiler: cl
45+
- os: ubuntu-latest
46+
cpp_compiler: g++-13
47+
exclude:
48+
- os: windows-latest
49+
cpp_compiler: g++-13
50+
- os: ubuntu-latest
51+
cpp_compiler: cl
52+
53+
steps:
54+
- uses: actions/checkout@v3
55+
56+
- name: Set Reusable Strings
57+
id: strings
58+
shell: bash
59+
run: |
60+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
61+
62+
- name: Install GCC
63+
if: ${{ matrix.os == 'ubuntu-latest' }}
64+
shell: bash
65+
run: |
66+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
67+
sudo apt-get update
68+
sudo apt-get -y install g++-13
69+
70+
- name: Configure CMake
71+
run: >
72+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
73+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
74+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
75+
-S ${{ github.workspace }}
76+
77+
- name: Build
78+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
79+
80+
- name: Upload Ubuntu Assets
81+
if: ${{ matrix.os == 'ubuntu-latest' }}
82+
uses: actions/upload-release-asset@v1
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
with:
86+
upload_url: ${{ needs.create_release.outputs.upload_url }}
87+
asset_name: vtfontmaker
88+
asset_path: ${{ steps.strings.outputs.build-output-dir }}/vtfontmaker
89+
asset_content_type: application/octet-stream
90+
91+
- name: Upload Windows Assets
92+
if: ${{ matrix.os == 'windows-latest' }}
93+
uses: actions/upload-release-asset@v1
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
with:
97+
upload_url: ${{ needs.create_release.outputs.upload_url }}
98+
asset_name: vtfontmaker.exe
99+
asset_path: ${{ steps.strings.outputs.build-output-dir }}/Release/vtfontmaker.exe
100+
asset_content_type: application/octet-stream

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vs/

CMakeLists.txt

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
project(vtfontmaker)
3+
4+
set(
5+
MAIN_FILES
6+
"src/main.cpp"
7+
"src/application.cpp"
8+
"src/canvas.cpp"
9+
"src/capabilities.cpp"
10+
"src/charsets.cpp"
11+
"src/coloring.cpp"
12+
"src/common_dialog.cpp"
13+
"src/dialog.cpp"
14+
"src/font.cpp"
15+
"src/glyphs.cpp"
16+
"src/iso2022.cpp"
17+
"src/keyboard.cpp"
18+
"src/macros.cpp"
19+
"src/menu.cpp"
20+
"src/os.cpp"
21+
"src/status.cpp"
22+
"src/vt.cpp"
23+
)
24+
25+
set(
26+
DOC_FILES
27+
"README.md"
28+
"LICENSE.txt"
29+
)
30+
31+
if(WIN32)
32+
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
33+
endif()
34+
35+
add_executable(vtfontmaker ${MAIN_FILES})
36+
37+
set_target_properties(vtfontmaker PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED On)
38+
source_group("Doc Files" FILES ${DOC_FILES})

CMakeSettings.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Ninja",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\build\\${name}",
9+
"installRoot": "${projectDir}\\build\\install\\${name}",
10+
"cmakeCommandArgs": "",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": ""
13+
},
14+
{
15+
"name": "x64-Release",
16+
"generator": "Ninja",
17+
"configurationType": "RelWithDebInfo",
18+
"inheritEnvironments": [ "msvc_x64_x64" ],
19+
"buildRoot": "${projectDir}\\build\\${name}",
20+
"installRoot": "${projectDir}\\build\\install\\${name}",
21+
"cmakeCommandArgs": "",
22+
"buildCommandArgs": "",
23+
"ctestCommandArgs": ""
24+
}
25+
]
26+
}

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 James Holderness
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
VT Font Maker
2+
=============
3+
4+
![Screenshot](screenshot.png)
5+
6+
This is a TUI application for editing VT soft fonts, also known as Dynamically
7+
Redefinable Character Sets. It requires a VT525 (or something of comparable
8+
functionality) to run, but it should be capable of editing fonts from most if
9+
not all of the DEC terminals.
10+
11+
12+
Quick Start
13+
-----------
14+
15+
* Use the cursor keys to move
16+
* Hold down `Alt` while moving to select a range
17+
* Press the `Space` bar to toggle a pixel
18+
* Use `F10` to open the menu
19+
20+
21+
Download
22+
--------
23+
24+
The latest binaries can be found on GitHub at the following url:
25+
26+
https://github.com/j4james/vtfontmaker/releases/latest
27+
28+
For Linux download `vtfontmaker`, and for Windows download `vtfontmaker.exe`.
29+
30+
31+
Build Instructions
32+
------------------
33+
34+
If you want to build this yourself, you'll need [CMake] version 3.15 or later
35+
and a C++ compiler supporting C++20 or later.
36+
37+
1. Download or clone the source:
38+
`git clone https://github.com/j4james/vtfontmaker.git`
39+
40+
2. Change into the build directory:
41+
`cd vtfontmaker/build`
42+
43+
3. Generate the build project:
44+
`cmake -D CMAKE_BUILD_TYPE=Release ..`
45+
46+
4. Start the build:
47+
`cmake --build . --config Release`
48+
49+
[CMake]: https://cmake.org/
50+
51+
52+
License
53+
-------
54+
55+
The VT Font Maker source code and binaries are released under the MIT License.
56+
See the [LICENSE] file for full license details.
57+
58+
[LICENSE]: LICENSE.txt

build/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

screenshot.png

+3
Loading

0 commit comments

Comments
 (0)