mirror of
https://github.com/NoCrypt/migu.git
synced 2026-08-19 13:45:48 +00:00
feat: useLocalFonts toggle
This commit is contained in:
parent
a19920729f
commit
1f8b2b5b0f
2 changed files with 12 additions and 2 deletions
|
|
@ -11,7 +11,8 @@
|
|||
torrentSpeed: 10,
|
||||
torrentPersist: false,
|
||||
torrentDHT: false,
|
||||
torrentPeX: false
|
||||
torrentPeX: false,
|
||||
missingFont: true
|
||||
}
|
||||
localStorage.removeItem('relations') // TODO: remove
|
||||
export const set = JSON.parse(localStorage.getItem('settings')) || { ...defaults }
|
||||
|
|
@ -188,6 +189,14 @@
|
|||
</div>
|
||||
<FontSelect class='form-control bg-dark shadow-lg w-300' on:change={changeFont} value={settings.font?.value} />
|
||||
</div>
|
||||
<div
|
||||
class='custom-switch mb-10 pl-10 font-size-16 w-300'
|
||||
data-toggle='tooltip'
|
||||
data-placement='bottom'
|
||||
data-title="Automatically Finds Fonts That Are Missing From A Video's Subtitles">
|
||||
<input type='checkbox' id='player-autoplay' bind:checked={settings.missingFont} />
|
||||
<label for='player-autoplay'>Find Missing Fonts</label>
|
||||
</div>
|
||||
<div class='col p-10 d-flex flex-column justify-content-end'>
|
||||
<div class='font-size-24 font-weight-semi-bold d-flex'>
|
||||
<div class='material-icons mr-10 font-size-30'>play_arrow</div>
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ export default class Subtitles {
|
|||
availableFonts: {
|
||||
'roboto medium': './Roboto.ttf'
|
||||
},
|
||||
workerUrl
|
||||
workerUrl,
|
||||
useLocalFonts: set.missingFont
|
||||
}
|
||||
if (set.font) {
|
||||
options.availableFonts[set.font.name.toLowerCase()] = new Uint8Array(set.font.data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue