From 67208272ca882a1c3538a853095ed1c3c4dbf8f9 Mon Sep 17 00:00:00 2001 From: xuty73419315 Date: Thu, 22 Aug 2024 12:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/canvasrenderingcontext2d.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api/canvasrenderingcontext2d.md b/docs/api/canvasrenderingcontext2d.md index 0d0590aa..d32a108c 100644 --- a/docs/api/canvasrenderingcontext2d.md +++ b/docs/api/canvasrenderingcontext2d.md @@ -4,6 +4,10 @@ 参考:[canvas组件](../component/canvas.md) +### 关于自定义字体 +当使用自定义字体时,首先使用uni.loadFontFace加载字体[见API](load-font-face.md),成功之后使用font属性指定fontfamily +完整示例代码参考[hello uni-app x](https://gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/pages/component/canvas/canvas-context.uvue) + -- GitLab