Skip to content

Update fontface.html #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions patches/fontface.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@
</head>
<body>
<textarea id="text-input" placeholder="Input text here...
在此输入文字..."></textarea><br />
<label for="font-file">Please select font 请选择字体(TTF):</label>
在此输入文字...
ここに文字入力..."></textarea><br />
<label for="font-file">Please select font 请选择字体 フォントを選択(TTF):</label>
<input type="file" id="font-file" accept=".ttf" onchange="applyCustomFont()" required>
<button id="convert-btn">Convert to Font Header<br>转换为字体 Header</button>
<button id="convert-btn">Convert to Font Header<br>转换为字体 Header<br>フォントHeaderに変換</button>
<img id="result" style="max-width: 100%;">
<script>
function applyCustomFont() {
const fontFileInput = document.getElementById('font-file');

if (fontFileInput.files.length == 0)
{
alert('Please select font!\n请选择字体!');
alert('Please select font!\n请选择字体!\nフォント選べ!');
return;
}

Expand Down Expand Up @@ -81,7 +82,7 @@
document.getElementById('convert-btn').addEventListener('click', function() {
const textInput = document.getElementById('text-input').value;
if (!textInput) {
alert('Please input text!\n请输入文字!');
alert('Please input text!\n请输入文字!\n文字入れて!');
return;
}

Expand Down