字体大小太大,不适合在高速缓存中太大、不适合、字体大小、高速缓存

由网友(一滴水墨)分享简介:所以,我最近切换到Android 3.0(蜂巢)和我在使用硬件渲染一些问题,特别是在一定的自定义视图我写,我用200的字体大小来显示一些文本。So i recently switched to android 3.0 (honeycomb) and i'm having some issues with hardwa...

所以,我最近切换到Android 3.0(蜂巢)和我在使用硬件渲染一些问题,特别是在一定的自定义视图我写,我用200的字体大小来显示一些文本。

So i recently switched to android 3.0 (honeycomb) and i'm having some issues with hardware rendering, specifically at a certain custom view i've written where I use a font size of 200 to display some text.

不幸的是,似乎openGLRenderer不喜欢那种相当大的字体大小的非常多,给出的错误,我发现了日志中:

Unfortunately it seems the openGLRenderer doesn't like that kind of rather large font sizes very much, given the error i'm getting in the log:

06-06 16:22:00.080: ERROR/OpenGLRenderer(2503): Font size to large to fit in cache. width, height = 97, 145

有没有办法解决这个(或方法来解决它),这样我可以在想要的字体大小显示文本?

Are there ways around this (or ways to fix it) such that I can get the text displayed at the wanted font size?

推荐答案

只是一个想法:也许你可以使用Paint.getTextPath(...)并使用此路径呈现文本。这应该允许您根据需要来调整路径。

Just an idea: Perhaps you can convert the font to an outline using Paint.getTextPath(...) and use this path to render the text. This should allow you to resize the path as needed.

阅读全文

相关推荐

最新文章