mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-10 16:10:55 +00:00
4.29.0
* Added: Support for OpenDyslexic and Google Fonts. Font Family settings now provide a list of fonts to choose from, in addition to allowing a custom font to be entered. * Changed: When saving a settings backup, the current date will be included in the filename by default. (Closes #1084)
This commit is contained in:
parent
a529e7fd27
commit
04cfbe6ed9
23 changed files with 394 additions and 28 deletions
|
@ -8,6 +8,7 @@ import {Color, ColorAdjuster} from 'utilities/color';
|
|||
import {get, has, make_enum, shallow_object_equals, set_equals, deep_equals} from 'utilities/object';
|
||||
import {WEBKIT_CSS as WEBKIT} from 'utilities/constants';
|
||||
import {FFZEvent} from 'utilities/events';
|
||||
import {useFont} from 'utilities/fonts';
|
||||
|
||||
import Module from 'utilities/module';
|
||||
|
||||
|
@ -717,6 +718,14 @@ export default class ChatHook extends Module {
|
|||
lh = Math.round((20/12) * size);
|
||||
|
||||
let font = this.chat.context.get('chat.font-family') || 'inherit';
|
||||
const [processed, unloader] = useFont(font);
|
||||
font = processed;
|
||||
|
||||
if ( this._font_unloader )
|
||||
this._font_unloader();
|
||||
|
||||
this._font_unloader = unloader;
|
||||
|
||||
if ( font.indexOf(' ') !== -1 && font.indexOf(',') === -1 && font.indexOf('"') === -1 && font.indexOf("'") === -1 )
|
||||
font = `"${font}"`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue