mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump crengine: more granular font weights (#7616)
Includes: - MathML: a few minor fixes - (Upstream) lvtext: fix possible index out of range - Fonts: RegisterExternalFont() should take a documentId - Fonts: fix: letter-spacing should not be applied on diacritic - (Upstream) Fonts: more granular synthetic weights - Fonts: synthesized weights: tweak some comments - Fonts: keep hinting with synthetic weight - Fonts: fix synthesized weight inconsitencies - Fonts: fix getFontFileNameAndFaceIndex() - Fonts: adds LVFontMan::RegularizeRegisteredFontsWeights() - Fonts: handle synth_weight tweaks in glyph/glyphinfo slots - (Upstream) Fonts: fix some compiler warnings - Fix hyphenation on Armenian and Georgian text Update the bottom menu widget "Font Weight" to allow more granular weights than the previous "regular | bold". Also bump thirdparty/luasec to v1.0.1.
This commit is contained in:
@@ -127,10 +127,10 @@ function ReaderFont:onReadSettings(config)
|
||||
or 22
|
||||
self.ui.document:setFontSize(Screen:scaleBySize(self.font_size))
|
||||
|
||||
self.font_embolden = config:readSetting("font_embolden")
|
||||
or G_reader_settings:readSetting("copt_font_weight")
|
||||
self.font_base_weight = config:readSetting("font_base_weight")
|
||||
or G_reader_settings:readSetting("copt_font_base_weight")
|
||||
or 0
|
||||
self.ui.document:toggleFontBolder(self.font_embolden)
|
||||
self.ui.document:setFontBaseWeight(self.font_base_weight)
|
||||
|
||||
self.font_hinting = config:readSetting("font_hinting")
|
||||
or G_reader_settings:readSetting("copt_font_hinting")
|
||||
@@ -238,9 +238,9 @@ function ReaderFont:onSetLineSpace(space)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderFont:onToggleFontBolder(toggle)
|
||||
self.font_embolden = toggle
|
||||
self.ui.document:toggleFontBolder(toggle)
|
||||
function ReaderFont:onSetFontBaseWeight(weight)
|
||||
self.font_base_weight = weight
|
||||
self.ui.document:setFontBaseWeight(weight)
|
||||
self.ui:handleEvent(Event:new("UpdatePos"))
|
||||
return true
|
||||
end
|
||||
@@ -288,7 +288,7 @@ function ReaderFont:onSaveSettings()
|
||||
self.ui.doc_settings:saveSetting("font_face", self.font_face)
|
||||
self.ui.doc_settings:saveSetting("header_font_face", self.header_font_face)
|
||||
self.ui.doc_settings:saveSetting("font_size", self.font_size)
|
||||
self.ui.doc_settings:saveSetting("font_embolden", self.font_embolden)
|
||||
self.ui.doc_settings:saveSetting("font_base_weight", self.font_base_weight)
|
||||
self.ui.doc_settings:saveSetting("font_hinting", self.font_hinting)
|
||||
self.ui.doc_settings:saveSetting("font_kerning", self.font_kerning)
|
||||
self.ui.doc_settings:saveSetting("word_spacing", self.word_spacing)
|
||||
|
||||
Reference in New Issue
Block a user