mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-07 04:44:35 -05:00
AndroidCompat: Use NotoSans as default font (#1572)
* Initial Noto fonts * Use Noto for other default fonts * Typeface: Prefer main font Eagerly switch back to main font as soon as it can display again; otherwise we might never switch back (or later than necessary); we should always prefer the main font * fix: Font metrics with fallback font on TextLine
This commit is contained in:
@@ -366,9 +366,8 @@ public class StaticLayout extends Layout {
|
||||
mRightIndents = b.mRightIndents;
|
||||
|
||||
String str = b.mText.subSequence(b.mStart, b.mEnd).toString();
|
||||
AttributedString text = new AttributedString(str);
|
||||
text.addAttribute(TextAttribute.FONT, getPaint().getFont());
|
||||
FontRenderContext frc = new FontRenderContext(getPaint().getFont().getTransform(), RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT, RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
|
||||
AttributedString text = getPaint().getTypeface().createWithFallback(str);
|
||||
FontRenderContext frc = new FontRenderContext(null, RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT, RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
|
||||
LineBreakMeasurer measurer = new LineBreakMeasurer(text.getIterator(), frc);
|
||||
// TODO: directions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user