Skip to content

Commit

Permalink
i j k diacritics
Browse files Browse the repository at this point in the history
  • Loading branch information
nclslbrn committed May 5, 2024
1 parent 3572375 commit 7e82630
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 41 deletions.
6 changes: 3 additions & 3 deletions demo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const mirrorYGlyph = (g: Glyph) =>
g.map((l: Line) => l.map((p: Vec) => [1 - p[0], p[1]]));

// font["ɜ"] = mirrorYGlyph(font["ɛ"])
console.log(JSON.stringify(scaleGlyph(font["H"])));
console.log(JSON.stringify(scaleGlyph(font["L"])));

for (let l = 0; l < lowercase.length; l++) {
if (font[lowercase[l]] === undefined) {
Expand All @@ -76,7 +76,7 @@ const update = () => {
let height = window.innerHeight;
const userInput = input.value !== textAtLaunch ? input.value : glyphKeys,
text = userInput.split("") as string[],
fontScale = parseFloat(inputSize.value),
fontScale = 0.2, //parseFloat(inputSize.value),
width = window.innerWidth - 40,
baseSize = Math.max(
16,
Expand Down Expand Up @@ -141,7 +141,7 @@ const init = () => {

inputSize.type = "range";
inputSize.min = "0.05";
inputSize.value = "0.07";
inputSize.value = "0.17";
inputSize.max = "0.2";
inputSize.step = "0.01";
inputSize.addEventListener("change", update);
Expand Down
12 changes: 6 additions & 6 deletions src/glyphs/diacritics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const diacritics = {
// grave accent
gr: [
[
[0.4, 0.1],
[0.6, 0.15],
[0.45, 0.1],
[0.55, 0.15],
],
],
// acute accent
ct: [
[
[0.4, 0.15],
[0.6, 0.1],
[0.45, 0.15],
[0.55, 0.1],
],
],
// circumflex accent
Expand Down Expand Up @@ -99,7 +99,7 @@ const diacritics = {
[0.6, 0.2],
],
],
// haček or caron
// haček
hc: [
[
[0.4, 0.1],
Expand Down Expand Up @@ -213,7 +213,7 @@ const diacritics = {
[0.85, 0.3],
[0.85, 0.25],
[0.90, 0.2],
],
] ,
],
// barred (kind of /)
brd: [
Expand Down
Loading

0 comments on commit 7e82630

Please sign in to comment.