mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-15 23:46:06 +09:00
font update
This commit is contained in:
@@ -36,7 +36,7 @@ const TYPESET_STRATEGY_JUSTIFIED = 3 // not implemented yet!
|
|||||||
const typesetStrats = [undefined, undefined, typesetLessRagged, typesetJustified]
|
const typesetStrats = [undefined, undefined, typesetLessRagged, typesetJustified]
|
||||||
|
|
||||||
let PAGE_HEIGHT = 60
|
let PAGE_HEIGHT = 60
|
||||||
let PAGE_WIDTH = 70
|
let PAGE_WIDTH = 80
|
||||||
// 80x60 -> 720x1080 text area; with 72px margin for each side, paper resolution is 864x1224, which is quite close to 1:sqrt(2) ratio
|
// 80x60 -> 720x1080 text area; with 72px margin for each side, paper resolution is 864x1224, which is quite close to 1:sqrt(2) ratio
|
||||||
|
|
||||||
let scroll = 0
|
let scroll = 0
|
||||||
@@ -365,7 +365,7 @@ function typesetJustified(lineStart, lineEnd) {
|
|||||||
printdbg(`contract-nugding ${justLen - paintWidth} characters`)
|
printdbg(`contract-nugding ${justLen - paintWidth} characters`)
|
||||||
adjust += justLen - paintWidth // the last word is going to be appended
|
adjust += justLen - paintWidth // the last word is going to be appended
|
||||||
}
|
}
|
||||||
// if any concatenation is impossible, recurse without last word (spaces will be trimmed on recursion), so that if-clauses below would treat them
|
// if any contraction is impossible, recurse without last word (spaces will be trimmed on recursion), so that if-clauses below would treat them
|
||||||
else if (justLen > paintWidth && spcAfterPunct.length < justLen - paintWidth) {
|
else if (justLen > paintWidth && spcAfterPunct.length < justLen - paintWidth) {
|
||||||
printdbg("TOSS OUT LAST")
|
printdbg("TOSS OUT LAST")
|
||||||
while ("tx" == words.last().type) {
|
while ("tx" == words.last().type) {
|
||||||
|
|||||||
BIN
assets/wpfont.kra
LFS
BIN
assets/wpfont.kra
LFS
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.8 KiB |
Reference in New Issue
Block a user