logo
  • 教程列表
  • SO官方文檔
  • 自定義字型
    • 畫布文字中的自定義字型
    • 使用 Android O 中的字型
    • 自定義字型到整個活動
    • 在你的應用中新增自定義字型
    • 初始化字型
    • 在 TextView 中使用自定義字型
    • 通過 xml 在 TextView 上應用字型(不需要 Java 程式碼)
    • 高效的字型載入
  1. StackOverflow 文件
  2. Android 教程
  3. 自定義字型
  4. 畫布文字中的自定義字型

畫布文字中的自定義字型

Created: November-22, 2018

使用你的資產字型在畫布中繪製文字。

Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/SomeFont.ttf");
Paint textPaint = new Paint();
textPaint.setTypeface(typeface);
canvas.drawText("Your text here", x, y, textPaint);
  • 使用 Android O 中的字型
  • 自定義字型

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明