initial commit: gd-controls plugin scaffolding
- promptfont font assets and license - key_mapping CSVs for Godot input bindings and prompt-font glyphs across keyboard/mouse, PC/Xbox/Sony/Nintendo controllers, and touch - gen.py generates prompt_font_mapping.gd from key_mapping/promptfont.csv, splicing between STARTGEN/ENDGEN markers - device, manager, file_manager scaffolding (work in progress) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1. This license is copied below, and is also available
|
||||
with a FAQ at <http://scripts.sil.org/OFL>
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,66 @@
|
||||
## About PromptFont
|
||||
This is a font designed for user interfaces and button prompts in games. It includes the base alphabet, icons for keys, gamepad buttons, devices, and a wide variety of general user interface icons like stats, actions, items, attributes, and more. All the icons included in the font are custom made and available under the same [SIL Open Font Licence](LICENSE.txt). Included trademarks however of course still belong to their respective owners.
|
||||
|
||||
PromptFont is based on the Xolonium font by Severin Meyer.
|
||||
|
||||
## Attribution
|
||||
If you use this font in your project please leave an attribution notice in your credits like this:
|
||||
|
||||
> PromptFont by Yukari "Shinmera" Hafner, available at https://shinmera.com/promptfont
|
||||
|
||||
## Release Files
|
||||
The [PromptFont release](https://codeberg.org/shinmera/promptfont/releases/download/latest/promptfont.zip) includes a couple of files. Here's what they're for:
|
||||
|
||||
- ``LICENSE.txt``
|
||||
A copy of the SIL Open Font license
|
||||
- ``README.md``
|
||||
A copy of this readme
|
||||
- ``index.html``
|
||||
A copy of the [website](https://shinmera.com/docs/promptfont) so you can use it offline as well
|
||||
- ``glyphs.json``
|
||||
This is a JSON file with an array of the glyphs the font provides. Each glyph is an object with the following attributes:
|
||||
- ``character`` The actual character as a one-character string
|
||||
- ``code`` The unicode codepoint name (``U+XXXX``)
|
||||
- ``codepoint`` The actual codepoint as an integer
|
||||
- ``category`` The category the glyph belongs to
|
||||
- ``name`` The unique human-readable name of the glyph
|
||||
- ``code-name`` The unique code-readable name of the glyph. It only contains lowercase characters a-z, numbers 0-9, and dashes. This should make it easy to turn into a code symbol
|
||||
- ``tags`` A list of tags that apply to the glyph. There are a number of tags for glyph variants and so on, but the most important categories are probably:
|
||||
- ``analog`` Analog stick movements and `l`, `r`, `s` for the sticks
|
||||
- ``button`` Button presses and `x`, `y`, `a`, `b`, `l1`, `r1`, `l3`, `r3`, etc for the buttons
|
||||
- ``dpad`` Dpad movements
|
||||
- ``key`` Keyboard keys
|
||||
- ``touch``, ``press``, ``hold``, ``release``, ``move-l``, ``move-r``, ``move-u``, ``move-d``, etc for movements
|
||||
- ``device`` Device icons
|
||||
- ``xbox`` Applies to Xbox style gamepads
|
||||
- ``nintendo`` Applies to Nintendo style gamepads
|
||||
- ``sony`` Applies to Sony Playstation style gamepads
|
||||
- ``generic`` Applies to any gamepad
|
||||
- ``ui`` User interface icons
|
||||
- ``wide-alternate`` The glyph has a wider alternate variant to its standard unit square representation. You can get the variant by shifting the codepoint up by 2560 (`0xA00`). If you use a text system that supports ligatures, you can instead use a zero-width space (`U+200B`) after a glyph to select its wide variant, if available. Since the zero-width space is invisible, if no wide alternate is available, it won't be visible that you tried to select for one, making the process completely transparent.
|
||||
- ``backfill`` This is a backfill glyph, intended for use together with another appropriate glyph. By using a different colour for the backfill glyph than for the following glyph, you can provide additional contrast and styling control for your prompt displays. If you use a text system that supports ligatures, you can instead use a zero-width joining space (`U+200A`) after a glyph to select its appropriate backfill glyph. So to create, for instance, a backfilled left click, you would write ``\\u278A\\u200A\\u278A`` and change the text colour for the first two and third characters.
|
||||
- ``tags.txt``
|
||||
A plaintext CSV file that maps all of the tags to the ``code-name`` of each glyph that was tagged as such. Each line is simply the tag name followed by the code names separated by a space.
|
||||
- ``promptfont.txt``
|
||||
A plaintext UTF-8 file that contains all the characters that the font provides.
|
||||
- ``promptfont.ttf`` ``promptfont.otf`` ``promptfont.woff`` ``promptfont.woff2``
|
||||
Compiled versions of the font, which you should be able to use directly in-engine or other programs.
|
||||
- ``promptfont.css``
|
||||
A CSS file that includes CSS classes for every special glyph, so you can easily embed it in HTML pages and JS games.
|
||||
- ``promptfont.h`` ``promptfont.cs`` ``promptfont.py`` ``promptfont.lua`` ``promptfont.lisp`` ``promptfont.rs`` ``promptfont.gd`` ``promptfont.gml``
|
||||
Source files that define constants for the special glyphs to allow easier embedding in C, C++, C#, Python, Lua, Lisp, Rust, GDScript and GML.
|
||||
- ``promptfont.exe`` ``promptfont.run`` ``promptfont.o``
|
||||
Binaries of the promptfont utilities. You can use this to search for glyphs or to compile the data files from the json representation.
|
||||
- ``atlas-*.png``
|
||||
Texture atlases of the various glyphs. Each glyph is 64x64 pixels and has a 1 pixel margin around itself. They are ordered left to right top to bottom according to their filename in the ``glyphs/`` directory of this repository. Since these rasterised versions don't scale well we heavily recommend you to use the fonts directly.
|
||||
|
||||
## Engine Specifics
|
||||
Since there's far too many engines out there and their methods vary a lot, we can't include guides in this repository. For specifics on how to use this font in your engine of choice, please consult the [user-contributed Wiki](https://shinmera.com/project/promptfont/wiki/).
|
||||
|
||||
## Contributing Glyphs
|
||||
For a brief guide on what to watch out for if you'd like to contribute to this font, please see the [CONTRIBUTING.md](CONTRIBUTING.md) file. If you'd like to request new glyphs to be added, please comment on the [issue ticket]().
|
||||
|
||||
## Support
|
||||
If you'd like to support the continued development of PromptFont, please consider becoming a backer on Patreon:
|
||||
|
||||
[](https://patreon.com/shinmera)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,325 @@
|
||||
@font-face {
|
||||
font-family: 'integratedpromptfont';
|
||||
src: url('promptfont.ttf');
|
||||
}
|
||||
@keyframes fadeOut {
|
||||
0% { opacity: 1;}
|
||||
50% { opacity: 1;}
|
||||
100% { opacity: 0;}
|
||||
}
|
||||
@keyframes rainbow{
|
||||
100%,0%{color: rgb(255,0,0)}
|
||||
8%{color: rgb(255,127,0)}
|
||||
16%{color: rgb(255,255,0)}
|
||||
25%{color: rgb(127,255,0)}
|
||||
33%{color: rgb(0,255,0)}
|
||||
41%{color: rgb(0,255,127)}
|
||||
50%{color: rgb(0,255,255)}
|
||||
58%{color: rgb(0,127,255)}
|
||||
66%{color: rgb(0,0,255)}
|
||||
75%{color: rgb(127,0,255)}
|
||||
83%{color: rgb(255,0,255)}
|
||||
91%{color: rgb(255,0,127)}
|
||||
}
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
font-size: 14pt;
|
||||
margin: 0 auto;
|
||||
max-width: 1280px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
header {
|
||||
padding: 1em;
|
||||
border-bottom: 3px solid #CCCCCC;
|
||||
}
|
||||
footer {
|
||||
padding: 1em;
|
||||
border-top: 3px solid #CCCCCC;
|
||||
text-align: center;
|
||||
}
|
||||
footer img {
|
||||
max-width: 800px;
|
||||
margin: 0 auto 2em auto;
|
||||
}
|
||||
a.button {
|
||||
font-size: 18pt;
|
||||
font-weight: normal;
|
||||
color: black;
|
||||
background: #EEEEEE;
|
||||
border: 2px solid #CCCCCC;
|
||||
border-radius: .2em;
|
||||
padding: .2em .4em;
|
||||
margin: .2em;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.button:hover {
|
||||
background: #CCCCCC;
|
||||
}
|
||||
main {
|
||||
background: #EEEEEE;
|
||||
padding: 2em 0 2em 0;
|
||||
}
|
||||
input {
|
||||
color: inherit;
|
||||
}
|
||||
input.search {
|
||||
box-sizing: border-box;
|
||||
width: 20em;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 0.2em 0.5em;
|
||||
border-radius: 0.2em;
|
||||
}
|
||||
.search {
|
||||
font-size: 1.5em;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
.composer {
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
background: #CCCCCC;
|
||||
font-family: integratedpromptfont;
|
||||
position: fixed;
|
||||
left: 0; right: 0; bottom: 0;
|
||||
}
|
||||
.composer .ProseMirror {
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
.composer .ProseMirror-menubar {
|
||||
border-width: 3px;
|
||||
}
|
||||
.composer .ProseMirror-menuitem {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
.composer .ProseMirror-menuitem .panel {
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
display: flex;
|
||||
background: #303030;
|
||||
align-items: center;
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
input.composer {
|
||||
box-sizing: border-box;
|
||||
font-family: inherit;
|
||||
width: 100%;
|
||||
display: block;
|
||||
padding: 0.2em 0.5em;
|
||||
border: none;
|
||||
}
|
||||
input.composer:focus {
|
||||
outline: none;
|
||||
}
|
||||
.glyphsection {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.glyphsection h2 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.glyph {
|
||||
text-align: center;
|
||||
margin: 1em;
|
||||
width: 8em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.glyph span {
|
||||
display: block;
|
||||
}
|
||||
.glyph code {
|
||||
display: block;
|
||||
}
|
||||
.glyph i {
|
||||
display: block;
|
||||
font-family: integratedpromptfont;
|
||||
font-size: 32pt;
|
||||
font-style: normal;
|
||||
transition: font-size .5s;
|
||||
}
|
||||
.glyph:hover i{
|
||||
font-size: 8em;
|
||||
}
|
||||
.notice{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
padding: 0.5em 1em;
|
||||
font-size: 1.5em;
|
||||
background: white;
|
||||
color: black;
|
||||
border-bottom: 2px solid #CCCCCC;
|
||||
opacity: 1;
|
||||
animation: fadeOut 2s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
.notice i{
|
||||
font-family: integratedpromptfont;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
min-width: 1em;
|
||||
}
|
||||
img{
|
||||
max-width: 100%;
|
||||
}
|
||||
.hidden{
|
||||
display: none !important;
|
||||
}
|
||||
#popup{
|
||||
background: rgba(0,0,0,0.5);
|
||||
position: fixed;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
#popup .box{
|
||||
flex-grow: 0;
|
||||
background: white;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 3em 1fr 1fr;
|
||||
column-gap: 0.5em;
|
||||
row-gap: 0.5em;
|
||||
font-size: 1.5em;
|
||||
box-shadow: 0 0 5em rgba(0,0,0,0.2);
|
||||
}
|
||||
#popup .box i{
|
||||
font-family: integratedpromptfont;
|
||||
font-style: normal;
|
||||
}
|
||||
#popup .box nav{
|
||||
grid-column: 1 / 3;
|
||||
grid-row: 1 / 2;
|
||||
font-size: 1.2em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #303030;
|
||||
color: #EFEFEF;
|
||||
}
|
||||
#popup .copy:hover, #popup .compose:hover{
|
||||
color: orange;
|
||||
cursor: pointer;
|
||||
}
|
||||
#popup .box nav *{
|
||||
margin: 0.5em;
|
||||
}
|
||||
#popup .box nav i{
|
||||
width: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
#popup .box nav h2{
|
||||
flex-grow: 1;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
#popup .box .preview{
|
||||
grid-column: 1 / 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 72pt;
|
||||
padding: 0.5em 2em;
|
||||
cursor: default;
|
||||
}
|
||||
#popup .box .preview.black{
|
||||
grid-row: 2/3;
|
||||
background: #202020;
|
||||
color: #E0E0E0;
|
||||
}
|
||||
#popup .box .preview.white{
|
||||
grid-row: 3/4;
|
||||
background: #E0E0E0;
|
||||
color: #202020;
|
||||
}
|
||||
#popup .box .preview i:hover{
|
||||
animation: rainbow 10s linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
#popup .box .info{
|
||||
grid-column: 2 / 3;
|
||||
grid-row: 2 / 4;
|
||||
padding: 1em;
|
||||
}
|
||||
#popup .box .info .row{
|
||||
display: flex;
|
||||
}
|
||||
#popup .box .info .row *{
|
||||
flex-grow: 1;
|
||||
}
|
||||
#popup .box .info .row label{
|
||||
flex-grow: 0;
|
||||
min-width: 6em;
|
||||
display: inline-block;
|
||||
}
|
||||
.glyphsection#all .glyph {
|
||||
width: 3em;
|
||||
}
|
||||
.glyphsection#all code {
|
||||
display: none;
|
||||
}
|
||||
.glyphsection#all span {
|
||||
display: none;
|
||||
}
|
||||
@media (prefers-color-scheme: dark){
|
||||
body {
|
||||
background: #202020;
|
||||
color: #E0E0E0;
|
||||
}
|
||||
header {
|
||||
border-color: #303030;
|
||||
}
|
||||
a {
|
||||
color: orange;
|
||||
}
|
||||
a.button {
|
||||
color: white;
|
||||
background: #303030;
|
||||
border-color: #555555;
|
||||
}
|
||||
a.button:hover {
|
||||
background: #555555;
|
||||
}
|
||||
main {
|
||||
background: #151515;
|
||||
color: #D0D0D0;
|
||||
}
|
||||
.search {
|
||||
background: #101010;
|
||||
border-color: #555555;
|
||||
}
|
||||
.composer {
|
||||
background: #252525;
|
||||
}
|
||||
.composer .ProseMirror-menubar {
|
||||
background: #303030;
|
||||
border-color: #555555;
|
||||
}
|
||||
.composer .ProseMirror-menuitem .ProseMirror-menu-active {
|
||||
background: #151515;
|
||||
}
|
||||
.composer .ProseMirror-menuseparator {
|
||||
border-color: #505050;
|
||||
}
|
||||
.notice {
|
||||
background: black;
|
||||
color: white;
|
||||
border-color: #555555;
|
||||
}
|
||||
#popup {
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
#popup .box {
|
||||
background: #202020;
|
||||
box-shadow: 0 0 5em rgba(0,0,0,1.0);
|
||||
}
|
||||
#popup .box nav {
|
||||
background: #303030;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,132 @@
|
||||
let notice = null;
|
||||
|
||||
let clearNotice = ()=>{
|
||||
if(notice){
|
||||
clearTimeout(notice.timeout);
|
||||
document.body.removeChild(notice.element);
|
||||
notice = null;
|
||||
}
|
||||
}
|
||||
|
||||
let showNotice = (html)=>{
|
||||
clearNotice();
|
||||
notice = {};
|
||||
notice.element = document.createElement("div");
|
||||
notice.element.setAttribute("class", "notice");
|
||||
notice.element.innerHTML = html;
|
||||
document.body.appendChild(notice.element);
|
||||
notice.timeout = setTimeout(clearNotice, 2000);
|
||||
};
|
||||
|
||||
let copyToClipboard = (string)=>{
|
||||
navigator.clipboard.writeText(string).then(
|
||||
()=>showNotice("<i>"+string+"</i> copied to clipboard!"),
|
||||
()=>showNotice("Failed to copy to clipboard."));
|
||||
};
|
||||
|
||||
let match = (query, el)=>{
|
||||
query = query.trim().toLowerCase();
|
||||
if(query === "") return true;
|
||||
let inner = el.innerText.toLowerCase();
|
||||
for(let k in el.dataset){
|
||||
inner += " "+k+":"+el.dataset[k].toLowerCase();
|
||||
}
|
||||
for(let part of query.split(/ +/)){
|
||||
if(!inner.includes(part))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
let find = (query)=>{
|
||||
for(let glyph of document.querySelectorAll(".glyph")){
|
||||
if(match(query, glyph)) return glyph;
|
||||
};
|
||||
return null;
|
||||
};
|
||||
|
||||
let composer = document.querySelector(".composer");
|
||||
composer.compose = (glyph)=>{
|
||||
composer.value += glyph.dataset["character"];
|
||||
};
|
||||
|
||||
let popup = document.querySelector("#popup");
|
||||
popup.glyph = null;
|
||||
popup.addEventListener("click", ()=>popup.classList.add("hidden"));
|
||||
popup.querySelector(".box").addEventListener("click", (ev)=>ev.stopPropagation());
|
||||
let hidePopup = ()=>popup.classList.add("hidden");
|
||||
let showPopup = (glyph)=>{
|
||||
popup.glyph = glyph;
|
||||
for(let el of popup.querySelectorAll("[data-text]"))
|
||||
el.innerText = glyph.dataset[el.dataset.text];
|
||||
popup.classList.remove("hidden");
|
||||
};
|
||||
for(let el of popup.querySelectorAll(".copy")){
|
||||
el.addEventListener("click", ()=>{
|
||||
copyToClipboard(el.innerText);
|
||||
});
|
||||
}
|
||||
for(let el of popup.querySelectorAll(".compose")){
|
||||
el.addEventListener("click", ()=>{
|
||||
composer.compose(popup.glyph);
|
||||
hidePopup();
|
||||
});
|
||||
}
|
||||
for(let el of document.querySelectorAll(".glyph")){
|
||||
el.addEventListener("click", (ev)=>{
|
||||
if(ev.ctrlKey) composer.compose(el);
|
||||
else showPopup(el)
|
||||
});
|
||||
}
|
||||
|
||||
let search = document.querySelector("input[type=search]");
|
||||
search.addEventListener("input", (ev)=>{
|
||||
let query = search.value;
|
||||
for(let glyph of document.querySelectorAll(".glyph")){
|
||||
if(match(query, glyph))
|
||||
glyph.classList.remove("hidden");
|
||||
else
|
||||
glyph.classList.add("hidden");
|
||||
}
|
||||
for(let section of document.querySelectorAll(".glyphsection")){
|
||||
if(section.querySelector(".glyph:not(.hidden)") !== null)
|
||||
section.classList.remove("hidden");
|
||||
else
|
||||
section.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
// Try the editor
|
||||
editor(composer);
|
||||
|
||||
// Query parameter wrangling
|
||||
search.value = new URLSearchParams(document.location.search).get("q");
|
||||
if(search.value) search.dispatchEvent(new Event('input', {bubbles: true}));
|
||||
|
||||
let pre = new URLSearchParams(document.location.search).get("c");
|
||||
if(pre){
|
||||
for(let query of pre.split(' ')){
|
||||
let found = find(query);
|
||||
if(found) composer.compose(found);
|
||||
}
|
||||
}
|
||||
|
||||
let updateQuery = ()=>{
|
||||
const url = new URL(window.location.href);
|
||||
if(search.value)
|
||||
url.searchParams.set("q", search.value);
|
||||
else
|
||||
url.searchParams.delete("q");
|
||||
if(composer.value){
|
||||
let parts = [];
|
||||
for(const codepoint of composer.value){
|
||||
let hex = codepoint.codePointAt(0).toString(16);
|
||||
parts.push("0000".substring(0, 4-hex.length)+hex);
|
||||
}
|
||||
url.searchParams.set("c", parts.join(" "));
|
||||
}else
|
||||
url.searchParams.delete("c");
|
||||
window.history.replaceState(null, '', url);
|
||||
}
|
||||
search.addEventListener("change", updateQuery);
|
||||
composer.addEventListener("change", updateQuery);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 168 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dketekofafye3"
|
||||
path="res://.godot/imported/preview.png-77f4630472c09587c75dd6977ce13622.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/gd-controls/fonts/promptfont/preview.png"
|
||||
dest_files=["res://.godot/imported/preview.png-77f4630472c09587c75dd6977ce13622.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
uid://etgn2q4yux0u
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://cghf1fy60knvy"
|
||||
path="res://.godot/imported/promptfont.otf-b6ba09760ea41d2b073d643b500ef004.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/gd-controls/fonts/promptfont/promptfont.otf"
|
||||
dest_files=["res://.godot/imported/promptfont.otf-b6ba09760ea41d2b073d643b500ef004.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://c3om505vtdpp0"
|
||||
path="res://.godot/imported/promptfont.ttf-8779440645ca7068936c9cabdf3fceb2.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/gd-controls/fonts/promptfont/promptfont.ttf"
|
||||
dest_files=["res://.godot/imported/promptfont.ttf-8779440645ca7068936c9cabdf3fceb2.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://wgxc825f3m34"
|
||||
path="res://.godot/imported/promptfont.woff-ca88eefa4915f5fb3e36fc7b94510676.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/gd-controls/fonts/promptfont/promptfont.woff"
|
||||
dest_files=["res://.godot/imported/promptfont.woff-ca88eefa4915f5fb3e36fc7b94510676.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://b4e4tohgnvhpp"
|
||||
path="res://.godot/imported/promptfont.woff2-0ff9573f54305acbf524118b660508f6.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/gd-controls/fonts/promptfont/promptfont.woff2"
|
||||
dest_files=["res://.godot/imported/promptfont.woff2-0ff9573f54305acbf524118b660508f6.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user