我想更改我在S60设备上的CEikLabel中使用的字体

我相信我可以做到以下几点

const CFont* aPlainFont = LatinPlain12();
aLabel->SetFont(aPlainFont);

其中LatinPlain12是此列表中的一个。
Albi12
Alp13
Alpi13
Albi13
alp17
Alb17b
albi17b
alpi17
Aco13
Aco21
Acalc21
LatinBold12
LatinBold13
LatinBold17
LatinBold19
LatinPlain12
Acb14
Acb30
Acp5

但是,谁可以帮助我从列表中找出哪些是固定宽度的呢。。谢谢:)

最佳答案

通过编程,您可以使用以下方法确定字体是否成比例:

const CFont* myFont;
// Initialize your font
// ....
TBool isProportional = (myFont->FontSpecInTwips().iTypeface.Attributes() & TTypeFace::EProportional);

顺便说一句,与依靠静态字体访问器函数相比,枚举设备上的字体和/或使用逻辑字体API可能更好。

关于c++ - 定宽字体-Symbian C++ CEikLabel,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/343946/

10-11 02:40
查看更多