Skip to content

Commit

Permalink
add Umlaute to futural, decrease y for dots in äöü
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Weber committed Apr 25, 2022
1 parent 6c7f396 commit 350ebf2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
8 changes: 7 additions & 1 deletion hershey_fonts/gen_c_src/futural.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* This file was generated with gen_C_code.m from fixed/futural.jhf */

/* number of glyphs in font */
unsigned char futural_cnt = 96;
unsigned char futural_cnt = 102;

/* Format: margin left, margin right, X, Y ... \0
< R> is pen-up, see original hershey font */
Expand Down Expand Up @@ -101,5 +101,11 @@ const char futural [] PROGMEM="JZ\0"\
"KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb\0"\
"F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O\0"\
"JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[YFZFZ[\0"\
"I[RFJ[ RRFZ[ RMTWT RNCODPCOBNC RTCUDVCUBTC\0"\
"G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNCODPCOBNC RTCUDVCUBTC\0"\
"G]KFKULXNZQ[S[VZXXYUYF RNCODPCOBNC RTCUDVCUBTC\0"\
"I\\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROFPGQFPEOF RTFUGVFUETF\0"\
"I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROFPGQFPEOF RTFUGVFUETF\0"\
"I\\MMMWNZP[S[UZXW RXMX[ ROFPGQFPEOF RTFUGVFUETF\0"\
;
/* End of file gen_c_src/futural.h */
12 changes: 6 additions & 6 deletions hershey_fonts/gen_c_src/rowmans.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ const char rowmans [] PROGMEM="JZ\0"\
"KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb\0"\
"F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O\0"\
"KYQFOGNINKOMQNSNUMVKVIUGSFQF\0"\
"I[RFJ[ RRFZ[ RMTWT RNDOEPDOCND RTDUEVDUCTD\0"\
"G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNDOEPDOCND RTDUEVDUCTD\0"\
"G]KFKULXNZQ[S[VZXXYUYF RNDOEPDOCND RTDUEVDUCTD\0"\
"I\\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROJPKQJPIOJ RTJUKVJUITJ\0"\
"I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROJPKQJPIOJ RTJUKVJUITJ\0"\
"I\\MMMWNZP[S[UZXW RXMX[ ROJPKQJPIOJ RTJUKVJUITJ\0"\
"I[RFJ[ RRFZ[ RMTWT RNCODPCOBNC RTCUDVCUBTC\0"\
"G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNCODPCOBNC RTCUDVCUBTC\0"\
"G]KFKULXNZQ[S[VZXXYUYF RNCODPCOBNC RTCUDVCUBTC\0"\
"I\\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROFPGQFPEOF RTFUGVFUETF\0"\
"I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROFPGQFPEOF RTFUGVFUETF\0"\
"I\\MMMWNZP[S[UZXW RXMX[ ROFPGQFPEOF RTFUGVFUETF\0"\
;
/* End of file gen_c_src/rowmans.h */
12 changes: 6 additions & 6 deletions hershey_fonts/patches/futural_umlaut.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
-12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[YFZFZ[
\ Kein Zeilenumbruch am Dateiende.
+12345 35JZJFJ[K[KFLFL[M[MFNFN[O[OFPFP[Q[QFRFR[S[SFTFT[U[UFVFV[W[WFXFX[Y[YFZFZ[
+12345 21I[RFJ[ RRFZ[ RMTWT RNDOEPDOCND RTDUEVDUCTD
+12345 34G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNDOEPDOCND RTDUEVDUCTD
+12345 23G]KFKULXNZQ[S[VZXXYUYF RNDOEPDOCND RTDUEVDUCTD
+12345 30I\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROJPKQJPIOJ RTJUKVJUITJ
+12345 30I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROJPKQJPIOJ RTJUKVJUITJ
+12345 23I\MMMWNZP[S[UZXW RXMX[ ROJPKQJPIOJ RTJUKVJUITJ
+12345 21I[RFJ[ RRFZ[ RMTWT RNCODPCOBNC RTCUDVCUBTC
+12345 34G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNCODPCOBNC RTCUDVCUBTC
+12345 23G]KFKULXNZQ[S[VZXXYUYF RNCODPCOBNC RTCUDVCUBTC
+12345 30I\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROFPGQFPEOF RTFUGVFUETF
+12345 30I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROFPGQFPEOF RTFUGVFUETF
+12345 23I\MMMWNZP[S[UZXW RXMX[ ROFPGQFPEOF RTFUGVFUETF
12 changes: 6 additions & 6 deletions hershey_fonts/patches/rowmans_umlaut.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
- 718 14KYQFOGNINKOMQNSNUMVKVIUGSFQF
\ Kein Zeilenumbruch am Dateiende.
+ 718 14KYQFOGNINKOMQNSNUMVKVIUGSFQF
+ 501 21I[RFJ[ RRFZ[ RMTWT RNDOEPDOCND RTDUEVDUCTD
+ 515 34G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNDOEPDOCND RTDUEVDUCTD
+ 521 23G]KFKULXNZQ[S[VZXXYUYF RNDOEPDOCND RTDUEVDUCTD
+ 601 30I\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROJPKQJPIOJ RTJUKVJUITJ
+ 615 30I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROJPKQJPIOJ RTJUKVJUITJ
+ 621 23I\MMMWNZP[S[UZXW RXMX[ ROJPKQJPIOJ RTJUKVJUITJ
+ 501 21I[RFJ[ RRFZ[ RMTWT RNCODPCOBNC RTCUDVCUBTC
+ 515 34G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RNCODPCOBNC RTCUDVCUBTC
+ 521 23G]KFKULXNZQ[S[VZXXYUYF RNCODPCOBNC RTCUDVCUBTC
+ 601 30I\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX ROFPGQFPEOF RTFUGVFUETF
+ 615 30I\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM ROFPGQFPEOF RTFUGVFUETF
+ 621 23I\MMMWNZP[S[UZXW RXMX[ ROFPGQFPEOF RTFUGVFUETF
17 changes: 9 additions & 8 deletions hershey_fonts/umlaut_helper.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
addpath ("../src");
fn = "fixed_b/futural.jhf";
fn = "fixed/futural.jhf";
#fn = "fixed/rowmans.jhf";

x = load_hf (fn);

Expand All @@ -11,24 +12,24 @@
new_lines = tmp([34, 48, 54, 66, 80, 86]);

# dot on the i
i_dot = strsplit (tmp{74}){2}(4:end);
i_dot = strsplit (strtrim (tmp{74})){2}(4:end);

for i = 1:numel (new_lines)
# add the dot twice with default shift
# this is a rough assumption which needs to be fine tuned below
if (i <= 3)
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, -3, -2));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, 3, -2));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, -3, -3));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, 3, -3));
else
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, -2, 4));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, 3, 4));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, -2, 0));
new_lines{i} = strcat (new_lines{i}, " R", hf_shift (i_dot, 3, 0));
endif
endfor

# fix glyphlen
add_len = (numel(i_dot) / 2 + 1) * 2;
for i = 1:numel (new_lines)
[S, E, ~, old_len_str] = regexp (new_lines{i}, "(?<= )[0-9]+", "once");
[S, E, ~, old_len_str] = regexp (new_lines{i}, "(?<= )[0-9]+(?=[A-Z])", "once");
old_len = str2double (old_len_str);
new_len = old_len + add_len;
tmp = strcat (new_lines{i}(1:S-1), sprintf(" %2i",new_len), new_lines{i}(E+1:end));
Expand Down Expand Up @@ -65,4 +66,4 @@
x(102) = tr (x(102), -2, 4, 3, 4); #ü
endif

plot_hf (x(97:end))
plot_hf (x([74,97:102]))

0 comments on commit 350ebf2

Please sign in to comment.