weixin_39813200
weixin_39813200
2020-11-29 18:37

default Typeface should be Roboto

I have just used this library and just simply justified plain text, and noticed that the font used by this library is not the standard typeface. If you look close, the text is jagged, and does not look like the other Roboto text in my app

该提问来源于开源项目:mathew-kurian/TextJustify-Android

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39813200 weixin_39813200 4月前

    Top black text is the Document view Bottom greyish text is Text view.

    screenshot_2015-08-10-05-22-16

    点赞 评论 复制链接分享
  • weixin_39813200 weixin_39813200 4月前

    found it. Things are good now with this issue

    点赞 评论 复制链接分享
  • weixin_39813200 weixin_39813200 4月前

    Also, is there no way to programmatically set the Typeface? The wiki is apparently out-of-date, and the .setTypeface method does not exist

    点赞 评论 复制链接分享
  • weixin_39808953 weixin_39808953 4月前

    Refer to this: https://github.com/bluejamesbond/TextJustify-Android/blob/6dc6b9297d3a5a97dc4422d5405c3430b6353593/sample/src/main/java/com/bluejamesbond/text/sample/helper/TestActivity.java#L71

    I am a bit busy these days but I will gladly accept a PR if you want to update the docs.

    点赞 评论 复制链接分享
  • weixin_39813200 weixin_39813200 4月前

    Do you also allow for antialiasing?

    Test: - Place a DocumentView above a TextView - Set both to the same text - Run app and take a screenshot - In gallary, zoom into the text close

    You will see that the DocumentView has jagged Text, but the TextView is smooth. This is the case even when the same font is used.

    点赞 评论 复制链接分享