Skip to content

Commit

Permalink
ruby text time
Browse files Browse the repository at this point in the history
  • Loading branch information
pontaoski committed Apr 19, 2024
1 parent 4ddb589 commit 3618a0f
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 83 deletions.
152 changes: 152 additions & 0 deletions src/lib/words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
type Dict = {
[id: string]: string
}

export const pu: Dict = {
"A": "\u{F1900}",
"AKESI": "\u{F1901}",
"ALA": "\u{F1902}",
"ALASA": "\u{F1903}",
"ALE": "\u{F1904}",
"ANPA": "\u{F1905}",
"ANTE": "\u{F1906}",
"ANU": "\u{F1907}",
"AWEN": "\u{F1908}",
"E": "\u{F1909}",
"EN": "\u{F190A}",
"ESUN": "\u{F190B}",
"IJO": "\u{F190C}",
"IKE": "\u{F190D}",
"ILO": "\u{F190E}",
"INSA": "\u{F190F}",
"JAKI": "\u{F1910}",
"JAN": "\u{F1911}",
"JELO": "\u{F1912}",
"JO": "\u{F1913}",
"KALA": "\u{F1914}",
"KALAMA": "\u{F1915}",
"KAMA": "\u{F1916}",
"KASI": "\u{F1917}",
"KEN": "\u{F1918}",
"KEPEKEN": "\u{F1919}",
"KILI": "\u{F191A}",
"KIWEN": "\u{F191B}",
"KO": "\u{F191C}",
"KON": "\u{F191D}",
"KULE": "\u{F191E}",
"KULUPU": "\u{F191F}",
"KUTE": "\u{F1920}",
"LA": "\u{F1921}",
"LAPE": "\u{F1922}",
"LASO": "\u{F1923}",
"LAWA": "\u{F1924}",
"LEN": "\u{F1925}",
"LETE": "\u{F1926}",
"LI": "\u{F1927}",
"LILI": "\u{F1928}",
"LINJA": "\u{F1929}",
"LIPU": "\u{F192A}",
"LOJE": "\u{F192B}",
"LON": "\u{F192C}",
"LUKA": "\u{F192D}",
"LUKIN": "\u{F192E}",
"LUPA": "\u{F192F}",
"MA": "\u{F1930}",
"MAMA": "\u{F1931}",
"MANI": "\u{F1932}",
"MELI": "\u{F1933}",
"MI": "\u{F1934}",
"MIJE": "\u{F1935}",
"MOKU": "\u{F1936}",
"MOLI": "\u{F1937}",
"MONSI": "\u{F1938}",
"MU": "\u{F1939}",
"MUN": "\u{F193A}",
"MUSI": "\u{F193B}",
"MUTE": "\u{F193C}",
"NANPA": "\u{F193D}",
"NASA": "\u{F193E}",
"NASIN": "\u{F193F}",
"NENA": "\u{F1940}",
"NI": "\u{F1941}",
"NIMI": "\u{F1942}",
"NOKA": "\u{F1943}",
"O": "\u{F1944}",
"OLIN": "\u{F1945}",
"ONA": "\u{F1946}",
"OPEN": "\u{F1947}",
"PAKALA": "\u{F1948}",
"PALI": "\u{F1949}",
"PALISA": "\u{F194A}",
"PAN": "\u{F194B}",
"PANA": "\u{F194C}",
"PI": "\u{F194D}",
"PILIN": "\u{F194E}",
"PIMEJA": "\u{F194F}",
"PINI": "\u{F1950}",
"PIPI": "\u{F1951}",
"POKA": "\u{F1952}",
"POKI": "\u{F1953}",
"PONA": "\u{F1954}",
"PU": "\u{F1955}",
"SAMA": "\u{F1956}",
"SELI": "\u{F1957}",
"SELO": "\u{F1958}",
"SEME": "\u{F1959}",
"SEWI": "\u{F195A}",
"SIJELO": "\u{F195B}",
"SIKE": "\u{F195C}",
"SIN": "\u{F195D}",
"SINA": "\u{F195E}",
"SINPIN": "\u{F195F}",
"SITELEN": "\u{F1960}",
"SONA": "\u{F1961}",
"SOWELI": "\u{F1962}",
"SULI": "\u{F1963}",
"SUNO": "\u{F1964}",
"SUPA": "\u{F1965}",
"SUWI": "\u{F1966}",
"TAN": "\u{F1967}",
"TASO": "\u{F1968}",
"TAWA": "\u{F1969}",
"TELO": "\u{F196A}",
"TENPO": "\u{F196B}",
"TOKI": "\u{F196C}",
"TOMO": "\u{F196D}",
"TU": "\u{F196E}",
"UNPA": "\u{F196F}",
"UTA": "\u{F1970}",
"UTALA": "\u{F1971}",
"WALO": "\u{F1972}",
"WAN": "\u{F1973}",
"WASO": "\u{F1974}",
"WAWA": "\u{F1975}",
"WEKA": "\u{F1976}",
"WILE": "\u{F1977}",
}
export const ku: Dict = {
"NAMAKO": "\u{F1978}",
"KIN": "\u{F1979}",
"OKO": "\u{F197A}",
"KIPISI": "\u{F197B}",
"LEKO": "\u{F197C}",
"MONSUTA": "\u{F197D}",
"TONSI": "\u{F197E}",
"JASIMA": "\u{F197F}",
"KIJETESANTAKALU": "\u{F1980}",
"SOKO": "\u{F1981}",
"MESO": "\u{F1982}",
"EPIKU": "\u{F1983}",
"KOKOSILA": "\u{F1984}",
"LANPAN": "\u{F1985}",
"N": "\u{F1986}",
"MISIKEKE": "\u{F1987}",
"KU": "\u{F1988}",
"POWE": "\u{F19A3}",
// "ISIPIN": "\u{F19A4}",
// "KAN": "\u{F19A5}",
// "OKE": "\u{F19A6}",
// "PASILA": "\u{F19A7}",
// "PO": "\u{F19A8}",
// "SAN": "\u{F19A9}",
}
144 changes: 61 additions & 83 deletions src/routes/font/[name]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import { ucsur } from '$lib/translation';
import type { PageData } from './$types';
import { decompress } from '$lib/compress-json/src/core'
import { pu, ku } from '$lib/words'
export let data: PageData
const font = decompress(data.data)
let selectedStyle: number = 0
console.warn(font)
</script>

<svelte:head>
Expand Down Expand Up @@ -146,125 +146,103 @@

<a href={`/font/${font.name}/glyphs`} class="text-xl py-2 text-orange-700 dark:text-orange-500 underline">o lukin e sitelen ale pi nasin ni</a>

<div class="py-4">
<h3 class="text-xl">nimi pu ale</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
󱤀󱤁󱤂󱤃󱤄󱤅󱤆󱤇󱤈<br/>
󱤉󱤊󱤋<br/>
󱤌󱤍󱤎󱤏<br/>
󱤐󱤑󱤒󱤓<br/>
󱤔󱤕󱤖󱤗󱤘󱤙󱤚󱤛󱤜󱤝󱤞󱤟󱤠<br/>
󱤡󱤢󱤣󱤤󱤥󱤦󱤧󱤨󱤩󱤪󱤫󱤬󱤭󱤮󱤯<br/>
󱤰󱤱󱤲󱤳󱤴󱤵󱤶󱤷󱤸󱤹󱤺󱤻󱤼<br/>
󱤽󱤾󱤿󱥀󱥁󱥂󱥃<br/>
󱥄󱥅󱥆󱥇<br/>
󱥈󱥉󱥊󱥋󱥌󱥍󱥎󱥏󱥐󱥑󱥒󱥓󱥔󱥕<br/>
󱥖󱥗󱥘󱥙󱥚󱥛󱥜󱥝󱥞󱥟󱥠󱥡󱥢󱥣󱥤󱥥󱥦<br/>
󱥧󱥨󱥩󱥪󱥫󱥬󱥭󱥮<br/>
󱥯󱥰󱥱<br/>
󱥲󱥳󱥴󱥵󱥶󱥷<br/>
</div>
<div slot="latin" class="text-[0.5in]">
a akesi ala alasa ale anpa ante anu awen <br/>
e en esun <br/>
ijo ike ilo insa <br/>
jaki jan jelo jo <br/>
kala kalama kama kasi ken kepeken kili kiwen ko kon kule kulupu kute <br/>
la lape laso lawa len lete li lili linja lipu loje lon luka lukin lupa <br/>
ma mama mani meli mi mije moku moli monsi mu mun musi mute <br/>
nanpa nasa nasin nena ni nimi noka <br/>
o olin ona open <br/>
pakala pali palisa pan pana pi pilin pimeja pini pipi poka poki pona pu <br/>
sama seli selo seme sewi sijelo sike sin sina sinpin sitelen sona soweli suli suno supa suwi <br/>
tan taso tawa telo tenpo toki tomo tu <br/>
unpa uta utala <br/>
walo wan waso wawa weka wile <br/>
</div>
</TextPreview>
</div>
<style scoped>
ruby {
@apply bg-orange-200 dark:bg-stone-950 rounded-lg mx-2 p-1 leading-relaxed;
}
ruby rt {
@apply font-sans text-sm pb-2;
}
</style>

<div class="py-4">
<h3 class="text-xl">nimi ku suli</h3>
<h3 class="text-xl pb-3">nimi pu ale</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
󱥹󱥺󱥻󱥼󱥽󱥾󱥿󱦀󱦁󱦂󱦃󱦄󱦅󱦆󱦇󱦈
</div>
<div slot="latin" class="text-[0.5in]">
kin oko kipisi leko monsuta tonsi jasima kijetesantakalu soko meso epiku kokosila lanpan n misikeke ku
<div slot="ucsur" class="text-[0.75in]">
{#each Object.entries(pu) as [word, ucsur]}
<ruby>{ucsur}<rt>{word.toLowerCase()}</rt></ruby>
{/each}
</div>
<div slot="latin" class="text-[0.5in] break-all">
<p>
{#each Object.entries(pu) as [word, ucsur]}
<ruby>{word.toLowerCase()}<rt>{word.toLowerCase()}&ZeroWidthSpace;</rt></ruby><span></span>
{/each}
</p>
</div>
</TextPreview>
</div>

<div class="py-4">
<h3 class="text-xl">nimi ku lili</h3>
<h3 class="text-xl pb-3">nimi ku</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
󱦠󱦡󱦢󱦣
<div slot="ucsur" class="text-[0.75in]">
{#each Object.entries(ku) as [word, ucsur]}
<ruby>{ucsur}<rt>{word.toLowerCase()}</rt></ruby>
{/each}
</div>
<div slot="latin" class="text-[0.5in]">
pake apeja majuna powe
<div slot="latin" class="text-[0.5in] break-all">
{#each Object.entries(ku) as [word, ucsur]}
<ruby>{word.toLowerCase()}<rt>{word.toLowerCase()}&ZeroWidthSpace;</rt></ruby>
{/each}
</div>
</TextPreview>
</div>

<div class="py-4">
<h3 class="text-xl">sitelen tan sitelen Ansi</h3>
<h3 class="text-xl pb-3">sitelen tan sitelen Ansi</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
<table class="text-center">
<tr>
<td>,</td>
<td>、</td>
<td>「</td>
<td>」</td>
</tr>
<tr class="font-sans text-lg">
<td class="px-2">sitelen lili kon</td>
<td class="px-2">sitelen lili en</td>
<td class="px-2">te</td>
<td class="px-2">to</td>
</tr>
</table>
<ruby>,<rt class="font-sans text-sm">sitelen lili kon</rt></ruby>
<ruby>、<rt class="font-sans text-sm">sitelen lili en</rt></ruby>
<ruby>「<rt class="font-sans text-sm">te</rt></ruby>
<ruby>」<rt class="font-sans text-sm">to</rt></ruby>
</div>
<div slot="latin" class="text-[0.5in]">
<table class="text-center">
<tr>
<td>、</td>
<td>「</td>
<td>」</td>
</tr>
<tr class="font-sans text-lg">
<td class="px-2">sitelen lili kon</td>
<td class="px-2">sitelen lili en</td>
<td class="px-2">te</td>
<td class="px-2">to</td>
</tr>
</table>
<ruby>,<rt class="font-sans text-sm">sitelen lili kon</rt></ruby>
<ruby>、<rt class="font-sans text-sm">sitelen lili en</rt></ruby>
<ruby>「<rt class="font-sans text-sm">te</rt></ruby>
<ruby>」<rt class="font-sans text-sm">to</rt></ruby>
</div>
</TextPreview>
</div>

<div class="py-4">
<h3 class="text-xl">sitelen ante pi sitelen pona</h3>
<h3 class="text-xl pb-3">sitelen ante pi sitelen pona</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
󱦐󱦑󱦜󱦝
<ruby>󱦐<rt class="font-sans text-sm">open poki</rt></ruby>
<ruby>󱦑<rt class="font-sans text-sm">pini poki</rt></ruby>
<ruby>󱦜<rt class="font-sans text-sm">sike</rt></ruby>
<ruby>󱦝<rt class="font-sans text-sm">sike tu</rt></ruby>
</div>
<div slot="latin" class="text-[0.5in]">
󱦐󱦑󱦜󱦝
<ruby>󱦐<rt class="font-sans text-sm">open poki</rt></ruby>
<ruby>󱦑<rt class="font-sans text-sm">pini poki</rt></ruby>
<ruby>󱦜<rt class="font-sans text-sm">sike</rt></ruby>
<ruby>󱦝<rt class="font-sans text-sm">sike tu</rt></ruby>
</div>
</TextPreview>
</div>

<div class="py-4">
<h3 class="text-xl">sitelen ante pi sitelen Lasina</h3>
<h3 class="text-xl pb-3">sitelen ante pi sitelen Lasina</h3>
<TextPreview name={font.fonts[selectedStyle].name} url={"/families/"+data.name+"/"+font.fonts[selectedStyle].filename} ucsur={font.ucsurCodepoints} ascii={font.asciiLigatures} weight={font.fonts[selectedStyle].weight.toString()} style={font.fonts[selectedStyle].style.toLowerCase()}>
<div slot="ucsur" class="text-[0.5in]">
&#123;&#125;.:
<ruby>(<rt class="font-sans text-sm">open sike</rt></ruby>
<ruby>)<rt class="font-sans text-sm">pini sike</rt></ruby>
<ruby>&#123;<rt class="font-sans text-sm">open linja</rt></ruby>
<ruby>&#125;<rt class="font-sans text-sm">pini linja</rt></ruby>
<ruby>.<rt class="font-sans text-sm">sike pini</rt></ruby>
<ruby>:<rt class="font-sans text-sm">sike ni</rt></ruby>
</div>
<div slot="latin" class="text-[0.5in]">
()&#123;&#125;.:
<ruby>(<rt class="font-sans text-sm">open sike</rt></ruby>
<ruby>)<rt class="font-sans text-sm">pini sike</rt></ruby>
<ruby>&#123;<rt class="font-sans text-sm">open linja</rt></ruby>
<ruby>&#125;<rt class="font-sans text-sm">pini linja</rt></ruby>
<ruby>.<rt class="font-sans text-sm">sike pini</rt></ruby>
<ruby>:<rt class="font-sans text-sm">sike ni</rt></ruby>
</div>
</TextPreview>
</div>
Expand Down

0 comments on commit 3618a0f

Please sign in to comment.