Font antialiasing?

Hi,

I have a component that contains a label and I am wondering if there is a antialias method that I can apply.
I perform scaling on the component and when I do so, the font gets all distorted.

Any guidance would be appreciated.

would it be feasible to redraw the label with an updated font size after scaling?

I’ve tried this with no luck unfortunately.

perhaps you should be more specific what component and how scaling?

I have created a custom scroller with “items” (a LayoutGroup with Group children). The “active” item has a scale of 1.0 and the “inactive” items are assigned a scale of 0.9. Within these items I am using a Label component. When the item is scaled to greater of less than 1.0 the Label text experiences a lot of distortion.

I am having this exact same issue. If I come up with a solution I’ll post it. Hopefully someone can come to our aid!

Hopefully they’ll be a fix for the issue in the next Firmware release :slightly_smiling_face:
If I figure anything out before then I’ll be sure to drop a line.

“Don’t” comes to mind as a workaround :slightly_smiling_face:
As in “don’t use scaling as a way to highlight the current item”

Design team is asking for it, so I have to atleast try :slightly_smiling_face:

“Tyler Smith” wrote:
Design team is asking for it, so I have to atleast try :slightly_smiling_face:
Show them the result then: “Mission accomplished!” :mrgreen:

On a side note, how about using instead width, height and ?

The parent has several children that all need to scale in unison with an Animation. It would be a last resort to try.

FWIW, I ran into a similar issue, and this is the response I got back from Roku when inquiring about it…

In general, scaling text is a very bad idea, as it will get very blocky. The string is rendered using glyph bitmaps based on just the font size, then the resulting bitmap representation of the string is scaled up or down. You’ll get very ugly text if you add any scale in the transformation matrix above it.

Sounds like “it is what it is”.

Bonus thought: is there something about the way scaling is done? Akin to ifTextureRequest.setScaleMode, the trade-off speed vs beauty.

Set the font size larger so it’s normally scaled down, which should be less of an issue and then the “scale up” is actually the native size?

“squirreltown” wrote:
Set the font size larger so it’s normally scaled down, which should be less of an issue and then the “scale up” is actually the native size?

This still looks bad on screen

“Tyler Smith” wrote:

“squirreltown” wrote:
Set the font size larger so it’s normally scaled down, which should be less of an issue and then the “scale up” is actually the native size?
This still looks bad on screen
I abandoned the whole idea of scaling and switched to active and inactive states for my issue, but… Could you move the label outside of the scaled group, and update the font size based on observing the “scale” field on the group that you’re scaling?

I bet it’s a bitmap scaling, i.e. everything is rendered to a bitmap first and scale factor is applied only at the very end when plastered on screen. It will work good for fleeting animations but not for static image on screen that needs crisp edges (like font).

I have to say i am confused about and font= though!

RTFM is vague” wrote:
Nodes that use fonts include a field that stores a Font node. The font to use is specified by creating a Font node, and setting its uri and size fields.Well which one is it - in B/S parlance there is the attribute label@font and label.font. One is a string, the other can be a list of elements - what happens if both are present or is repeated? Hopefully not “kaboom”

“EnTerr” wrote:
I bet it’s a bitmap scaling, i.e. everything is rendered to a bitmap first and scale factor is applied only at the very end when plastered on screen. It will work good for fleeting animations but not for static image on screen that needs crisp edges (like font).

That is exactly what is happening. So, we finally decided that we’re passing on scaling the item.