gpt4 book ai didi

qt - 如何在qml中使用roboto thin font

转载 作者:行者123 更新时间:2023-12-01 22:38:14 27 4
gpt4 key购买 nike

我正在尝试在 Linux 的 QML 中使用 robot thin 字体。我在 ubuntu 上安装了粗体、细体和浅体。 openoffice 等其他程序只显示 roboto。我如何在 qml 中使用 roboto thin or light?

最佳答案

FontLoader 将解决 Light Roboto 的问题,但不会解决 Thin 的问题,因为它不是运动重量。如果您想使用轻量级,请记住在文本元素中调用 font.weight: Font.Light

您需要将 Roboto-thin.ttf 重新打包为新字体,然后使用 FontLoader 将其导入回来(不需要 font。重量:Font.Light 在这种情况下调用)

关于qt - 如何在qml中使用roboto thin font,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19654352/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com