# 为什么.dwg文件中使用的字体显示不正确？

 1. [FAQ](/cn/faq)
2. »
3. [Text and Font Questions](/faq/text-and-font-questions)

可能原因是当前应用程序无法获取该字体。以下是几种解决方案：

```plaintext
OdString fontFile = pHostApp->findFile(L"fontFileName.ttf"); // Or use the full path name
OdTtfDescriptor descr;
pHostApp->ttfFileNameByDescriptor(descr, fontFile);
```

1. *将字体文件放在与图纸相同的文件夹中。确保该字体包含所需字符。*
2. *如果图纸与应用程序不在同一文件夹，可以使用ACAD环境变量设置包含所需字体的文件夹，或使用应用程序的findFile()方法指定字体文件位置：*

有关字体处理的详细信息请参阅: <https://docs.opendesign.com/td/FontHandling.html>
