| 1 |
<!DOCTYPE html> |
| 2 |
<!-- |
| 3 |
A GUI for PUA2OT. |
| 4 |
|
| 5 |
Licensed under the Apache License, version 2.0: |
| 6 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 7 |
--> |
| 8 |
<html lang="en"> |
| 9 |
<head> |
| 10 |
<meta charset="utf-8"> |
| 11 |
<title>MUFI Private Use to OpenType Converter</title> |
| 12 |
<style> |
| 13 |
@font-face { |
| 14 |
font-family: "junicode"; |
| 15 |
src: url("../fonts/JunicodeVF-Roman.woff2"); |
| 16 |
font-weight: 300 700; |
| 17 |
font-stretch: 75% 125%; |
| 18 |
} |
| 19 |
@font-face { |
| 20 |
font-family: "junicode"; |
| 21 |
src: url("../fonts/JunicodeVF-Italic.woff2"); |
| 22 |
font-style: italic; |
| 23 |
font-weight: 300 700; |
| 24 |
font-stretch: 75% 125%; |
| 25 |
} |
| 26 |
@font-face { |
| 27 |
font-family: "notosans"; |
| 28 |
src: url("../fonts/NotoSans-Regular.woff2"); |
| 29 |
} |
| 30 |
body { |
| 31 |
font-family: junicode; |
| 32 |
font-size: 150%; |
| 33 |
line-height: 1.5; |
| 34 |
margin-left: 10%; |
| 35 |
margin-right: 10%; |
| 36 |
font-feature-settings: "ss09"; |
| 37 |
} |
| 38 |
fieldset { |
| 39 |
flex: 1; |
| 40 |
padding: 0; |
| 41 |
} |
| 42 |
.container { |
| 43 |
display: flex; |
| 44 |
column-gap: 10px; |
| 45 |
} |
| 46 |
/* #destbox { |
| 47 |
font-feature-settings: "ss10", "cv69" 7; |
| 48 |
} */ |
| 49 |
#char_skip { |
| 50 |
font-family: junicode; |
| 51 |
font-feature-settings: "lnum", "tnum"; |
| 52 |
} |
| 53 |
.edit-box { |
| 54 |
padding: 10px; |
| 55 |
max-height: 400px; |
| 56 |
overflow-y: auto; |
| 57 |
} |
| 58 |
.plainformat { |
| 59 |
white-space: pre-wrap; |
| 60 |
word-wrap: break-word; |
| 61 |
overflow-wrap: break-word; |
| 62 |
} |
| 63 |
h1 { |
| 64 |
font-size: 120%; |
| 65 |
font-weight: 400; |
| 66 |
font-feature-settings: "smcp"; |
| 67 |
} |
| 68 |
h2 { |
| 69 |
font-size: 110%; |
| 70 |
font-weight: 400; |
| 71 |
font-feature-settings: "smcp"; |
| 72 |
} |
| 73 |
div.edit-box p { |
| 74 |
margin-top: 1em; |
| 75 |
margin-bottom: 1em; |
| 76 |
} |
| 77 |
div.edit-box p:first-of-type { |
| 78 |
margin-top: 0em; |
| 79 |
} |
| 80 |
p.intro { |
| 81 |
font-size: 80%; |
| 82 |
} |
| 83 |
li { |
| 84 |
font-size: 80%; |
| 85 |
} |
| 86 |
td { |
| 87 |
padding: 0px 10px; |
| 88 |
vertical-align: top; |
| 89 |
} |
| 90 |
dt { |
| 91 |
font-style: italic; |
| 92 |
font-size: 80%; |
| 93 |
} |
| 94 |
dd { |
| 95 |
font-size: 80%; |
| 96 |
} |
| 97 |
input[type="text"] { |
| 98 |
width: 40ch; |
| 99 |
} |
| 100 |
legend { |
| 101 |
font-family: notosans, Arial, sans; |
| 102 |
font-size: 70%; |
| 103 |
color: rgb(99, 53, 183); |
| 104 |
} |
| 105 |
.codeview { |
| 106 |
font-family: notosans, Arial, sans; |
| 107 |
font-size: 70%; |
| 108 |
} |
| 109 |
.code { |
| 110 |
font-family: notosans, Arial, sans; |
| 111 |
font-size: 75%; |
| 112 |
} |
| 113 |
.unic { |
| 114 |
font-feature-settings: "lnum", "tnum"; |
| 115 |
} |
| 116 |
.pua { |
| 117 |
color: red; |
| 118 |
} |
| 119 |
.dispopts { |
| 120 |
display: flex; |
| 121 |
width: 100%; |
| 122 |
justify-content: space-between; |
| 123 |
} |
| 124 |
</style> |
| 125 |
</head> |
| 126 |
<body> |
| 127 |
<h1>MUFI Private Use to OpenType Converter</h1> |
| 128 |
<div id="boxes" class="container"> |
| 129 |
<fieldset> |
| 130 |
<legend>Source</legend> |
| 131 |
<div class="edit-box" id="sourcebox"> |
| 132 |
I þe feadereſ ⁊ ı þe ſuneſ ⁊ ı þe alı gaſteſ nome er bıgınneð ancrene ƿıſſe. |
| 133 |
Rectı dılıgunꞇ ꞇe. I canꞇıcıſ ſponſa ad ſponſum. |
| 134 |
Eſt rectum gramaꞇıcum ʀectū geomeꞇrıcum ʀectū ꞇeologıcum. |
| 135 |
ꞇ ſunꞇ dıfferencıe ꞇoꞇıꝺem regulaꝝ. |
| 136 |
De recto ꞇeologıco ſermo nobıſ eſt. cuıꝰ regule ꝺue ſunꞇ. |
| 137 |
Vna cırca coꝛdıſ dırectıonem lꞇera uerſaꞇur cca exꞇerıoꝛum |
| 138 |
rectıfıcaꞇıonem. Rectı dılıgunꞇ ꞇe. |
| 139 |
Lauerꝺ ſeıð godeſ ſpuſe ꞇo ıre ꝺeoreƿurðe ſpuſ. |
| 140 |
e rıꞇe luuıeð þe. eo beoð rıꞇe þe luuıeð eer rıƿle. |
| 141 |
nꞇ ᵹe ıne leoue ſuſtren abbeð monı deı ıcraueꞇ on me |
| 142 |
eer rıƿle. onıe cunne rıƿlen beoð. a ꞇƿa beoð bımong alle. |
| 143 |
ꝥ ıc culle ſpeoken of þur oƿer bone ƿıð goꝺes grace þe |
| 144 |
an riƿleð þe heoꝛꞇe ⁊ makeð efne ⁊ ſmeðe ƿıð uꞇe cnoſt ⁊ dolc |
| 145 |
of ƿo ınƿıꞇ ⁊ of ƿreıᵹende þe ſegge. er þu ſunegeſt |
| 146 |
oþer þıſ nıſ naƿꞇ ıbeꞇ ᵹeꞇ aſe ƿel as ıꞇ ate. |
| 147 |
</div> |
| 148 |
</fieldset> |
| 149 |
<fieldset> |
| 150 |
<legend>Destination</legend> |
| 151 |
<div class="edit-box" id="destbox"> |
| 152 |
The converted text will appear here. |
| 153 |
</div> |
| 154 |
</fieldset> |
| 155 |
</div> |
| 156 |
<div class="dispopts"> |
| 157 |
<div> |
| 158 |
<input type="file" id="file_input"> |
| 159 |
</div> |
| 160 |
<div> |
| 161 |
<label for="edit_source" style="font-size: 80%;">Edit Source</label> |
| 162 |
<input type="checkbox" id="edit_source"> |
| 163 |
</div> |
| 164 |
<div> |
| 165 |
<label id="mark_pua_label" for="mark_pua" style="font-size: 80%;">Mark Replaced Chars in Source:</label> |
| 166 |
<input type="checkbox" id="mark_pua"> |
| 167 |
</div> |
| 168 |
<div> |
| 169 |
<label for="show_code" style="font-size: 80%;">Show Code:</label> |
| 170 |
<input type="checkbox" id="show_code"> |
| 171 |
</div> |
| 172 |
<div> |
| 173 |
<button id="dnlbutton" type="button">Download</button> |
| 174 |
</div> |
| 175 |
<div> |
| 176 |
<button id="cpybutton" type="button">Copy</button> |
| 177 |
</div> |
| 178 |
</div> |
| 179 |
<hr> |
| 180 |
<div> |
| 181 |
<table> |
| 182 |
<tr> |
| 183 |
<td> |
| 184 |
Options: |
| 185 |
</td> |
| 186 |
<td> |
| 187 |
<label for="method_preference" >More legible markup:</label> |
| 188 |
<input type="checkbox" id="method_preference" value="0"><br> |
| 189 |
<label for="utag_entities">Use entities for Unicode tags:</label> |
| 190 |
<input type="checkbox" id="utag_entities" value="0"><br> |
| 191 |
<label for="alternate_unicodes">Alternate bases for:</label> |
| 192 |
<select id="alternate_unicodes" multiple> |
| 193 |
<option value="insular">Insular</option> |
| 194 |
<option value="smallcap">Small caps</option> |
| 195 |
<option value="punctuation">Punctuation</option> |
| 196 |
<option value="mark">Marks</option> |
| 197 |
<option value="currency">Currency</option> |
| 198 |
<option value="alpha">Misc. alphabetic</option> |
| 199 |
</select><br> |
| 200 |
<label for="char_skip">Skip characters:</label> |
| 201 |
<input type="text" id="char_skip" value=""><br> |
| 202 |
</td> |
| 203 |
<td> |
| 204 |
<label for="problem_unicodes">Keep problematic Unicodes:</label> |
| 205 |
<input type="checkbox" id="problem_unicodes" value="0"><br> |
| 206 |
<label for="enlarge_scale">Enlarge axis scale:</label> |
| 207 |
<input type="number" id="enlarge_scale" value="32" min="0" max="100"><br> |
| 208 |
<label for="default_features">Default features:</label> |
| 209 |
<input type="text" id="default_features" value="ss10 cv69[7]" |
| 210 |
style="background-color: initial;"><br> |
| 211 |
<label for="non_word_tags">Non-word tags:</label> |
| 212 |
<input type="text" id="non_word_tags" |
| 213 |
value='ss04 ss05 ss06 pcap smcp hlig' |
| 214 |
style="background-color: initial;"><br> |
| 215 |
<label for="language_choice">Language:</label> |
| 216 |
<select id="language_choice"> |
| 217 |
<option value="en" selected>English</option> |
| 218 |
<option value="is">Icelandic</option> |
| 219 |
<option value="la">Latin</option> |
| 220 |
<option value="de">German</option> |
| 221 |
<option value="fr">French</option> |
| 222 |
<option value="es">Spanish</option> |
| 223 |
<option value="el">Greek</option> |
| 224 |
<option value="other">Other</option> |
| 225 |
</select> |
| 226 |
</td> |
| 227 |
</tr> |
| 228 |
</table> |
| 229 |
<dialog id="lang_code_picker"> |
| 230 |
<form method="dialog"> |
| 231 |
<p>Two-letter language tag:</p> |
| 232 |
<input type="text" id="langInput" name="langInput" placeholder="Language" required><br> |
| 233 |
<button type="button" value="cancel" id="language_cancel">Cancel</button> |
| 234 |
<button type="submit" value="okay" id="language_okay">Okay</button> |
| 235 |
</form> |
| 236 |
</dialog> |
| 237 |
</div> |
| 238 |
<div><hr></div> |
| 239 |
<p class="intro"> |
| 240 |
Load a text or html file (replacing the sample text) using the “Choose File” |
| 241 |
(or “Browse”) button or drag it into the |
| 242 |
“Source” box; the text will immediately be converted and displayed in the |
| 243 |
“Destination” box. Click “Download” or “Copy” to export the converted text. |
| 244 |
The Options affect the conversion as follows: |
| 245 |
</p> |
| 246 |
<ul> |
| 247 |
<li> |
| 248 |
<b>More legible markup.</b> By default, the conversion prefers methods |
| 249 |
using Unicode tags and (for ligatures) the zero-width joiner. Check this |
| 250 |
box to make it prefer <span> tags with style attributes. |
| 251 |
</li> |
| 252 |
<li> |
| 253 |
<b>Use entities for Unicode tags.</b> The conversion will insert |
| 254 |
entities (not HTML entities, but Junicode’s). These may interfere with |
| 255 |
searching, but they make Unicode tags visible. |
| 256 |
</li> |
| 257 |
<li> |
| 258 |
<b>Alternate bases.</b> For several categories of character, there |
| 259 |
are alternate base characters (with different associated methods). |
| 260 |
While the defaults have been chosen to maximize accessibility and |
| 261 |
minimize file size, many users may have good reasons to prefer the |
| 262 |
alternates. Click on any of the listed categories (hold down the |
| 263 |
shift or command/control keys to select more than one) to shift to |
| 264 |
the alternate bases for that category. |
| 265 |
</li> |
| 266 |
<li> |
| 267 |
<b>Skip characters.</b> This is a space-separated list of characters |
| 268 |
(and/or hexadecimal codes) that you would rather not have converted. |
| 269 |
For this list to be valid, the characters must all be part of the |
| 270 |
collection of PUA and other characters that this script replaces; |
| 271 |
any hexadecimal codes must be at least four characters long (pad |
| 272 |
with zeros if necessary). |
| 273 |
</li> |
| 274 |
<li> |
| 275 |
<b>Keep problematic Unicodes.</b> In addition to PUA characters, |
| 276 |
the script converts Unicodes that <i>look</i> like letters of the |
| 277 |
alphabet, but that many apps do not recognize as such. If you want to |
| 278 |
keep these Unicodes, check this box. |
| 279 |
</li> |
| 280 |
<li> |
| 281 |
<b>Enlarge axis scale.</b> In “legible” mode, this app uses |
| 282 |
Junicode’s Enlarge axis to produce MUFI’s Enlarged minuscules (see |
| 283 |
the <i>Junicode Manual</i>, Chapter 7). In this mode, you can |
| 284 |
adjust the size of these letters precisely, on a scale from 0 (letters |
| 285 |
are the size and weight of lowercase letters) to 100 (letters are |
| 286 |
the same size and weight as capitals). The default value is 32, which |
| 287 |
produces letters that match MUFI’s PUA characters and the letters |
| 288 |
produced by Junicode’s <b>ss06</b>. |
| 289 |
</li> |
| 290 |
<li> |
| 291 |
<b>Default features.</b> These are the OpenType features that should |
| 292 |
always be on in your document: the script needs to track them. On |
| 293 |
export, they will be output to a <div> enclosing the text. This |
| 294 |
is a space-separated series of four-letter OpenType tags. If the feature |
| 295 |
requires an index, type the number in brackets after the tag (e.g. |
| 296 |
<b>cv69[7]</b>). These tags are not validated aside from checking that |
| 297 |
they are four characters long. |
| 298 |
</li> |
| 299 |
<li> |
| 300 |
<b>Non-word tags.</b> Most OpenType features are applied to whole words; |
| 301 |
the features listed here are instead applied to individual letters. |
| 302 |
If you decide that another feature should be applied only to individual |
| 303 |
letters, add it to this list. Only feature tags used by pua2ot are |
| 304 |
accepted here. |
| 305 |
</li> |
| 306 |
<li> |
| 307 |
<b>Language.</b> The language of the text. Be sure to set this, since |
| 308 |
OpenType features may act differently depending on the language. |
| 309 |
</li> |
| 310 |
</ul> |
| 311 |
<script src="./pua2ot-gui-min.js"></script> |
| 312 |
<!-- <script src="../src/PUA2OT_DATA.js"></script> |
| 313 |
<script src="../src/pua2ot-common.js"></script> |
| 314 |
<script src="../src/pua2ot-gui.js"></script> --> |
| 315 |
</body> |
| 316 |
|
| 317 |
</html> |