HydrogenAudio

Hosted Forums => foobar2000 => Uploads - (fb2k) => Topic started by: anathema on 2004-01-21 02:53:38

Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 02:53:38
sorry if this has been brought up before, but.. what's going on?
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:00:52
you can set how you want text to be rendered in the ski file

either as a global, or for each sprite

like this:

Code: [Select]
section globals
....
int texthint texthint.AntiAlias



sprite artistfield
...
int texthint texthint.AntiAlias



the choices are:

texthint.SystemDefault - default
texthint.SingleBitPerPixelGridFit
texthint.SingleBitPerPixel
texthint.AntiAliasGridFit
texthint.AntiAlias
texthint.ClearTypeGridFit
- Windows XP only

you can also use numeric references 0-5 where 0 = system default, eg.

int texthint 4

is the same as

int texthint texthint.AntiAlias

it's best to try out the different styles until the text is rendered how you like it

if you're still confused, i'll make a screenshot showing the different renderings
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:06:06
thanks for the quick response!
adding "int texthint texthint.SystemDefault" did the trick. are you sure it's set as default?
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:07:44
hmm

to be honest, no - i'm not sure


but i'm glad it is better now
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:17:10
uh oh..
when I change the text rendering method, my right-aligned titles don't line up correctly.
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:18:08
is it a single sprite

or 3 seperate sprites

attach the look/code
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:20:10
three separate.

Code: [Select]
section globals
list statemap states.None
list fontcolor color.black
int fontsize 8
int fontstyle fontstyle.Regular
string fontname "Verdana"
int halign 2
int texthint texthint.ClearTypeGridFit

sprite artistInfo
list rect int { 0 25 390 15 }
string fspec "%artist%"

sprite titleInfo
list rect int { 0 41 390 15 }
string fspec "%title%"

sprite albumInfo
list rect int { 0 57 390 15 }
string fspec "%album%"
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:22:37
for a start, it best to use

Code: [Select]
int halign align.far


makes more sense than 2

let me see

can you attach the ski & graphics?


btw, i think AntiAlias is the default texthint
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:26:22
there aren't really any graphics.. I'm just trying to make something to go in the corner of my desktop to show album art and track info. here's the ski though.
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:29:36
doh

just remembered win2k doesn't support 'cleartype'

it seems there is a problem with right-aligning cleartype text

one second...
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:30:39
it has the same problem if I use SystemDefault, if that helps you out.
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:35:06
yes..


well, your system default seems to be cleartype too (XP is cleartype by default)

if you go to windows properties > appearance

i bet you will find cleartype enabled


ok - it aligns perfectly when the render type is not a grid fit

all of the grid fit render types misalign in right-align mode


the non-grid types are:

texthint.SingleBitPerPixel
texthint.AntiAlias


test you skin with these render modes

i think you will find they line up correctly
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:39:49
hmm.. all of the "GridFit" options align poorly for me. weird.
well, maybe I'll just move to a different corner.
thanks for all your help.

edit: by the way, how would I go about having multiple lines in one sprite? maybe that would solve the problem.

edit2: never mind.. figured it out and that worked!
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:44:50
there's currently no way to perform a 'carriage-return' inside a string

it simply spills over to the next line when it is too long in 'noclip' mode

i don't recommend this because you will have no control over which line the fields appear on


forget i ever mentioned it  - perhaps in a future version

edit: what do you mean figured it out? show me
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:45:45
actually using $char(13)$char(10) for line breaks seems to be working for me.
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:46:25
really??!

wow - they used to get ignored by the parser

i never tried them in recent builds


now you've taught me something
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 03:49:33
haha, well now we're even.

edit: really? it's working fine for me now.
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 03:53:36
yes - it is

sorry

it's because i'm using win2k

i have to use a little imagination to approximate how the cleartype will be



glad you go it sorted out

Code: [Select]
string fspec "$trim(%artist%$char(10)%title%$char(10)%album%)"


this is what i used



good teamwork btw
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 04:00:16
one more 'tip'

in your text sprite, put


Code: [Select]
bool enabled false



that way it ignores mouse input, so you can still drag the look, even when over the text sprite


obviously, if you are planning to make the text clickable or something, then don't disable it - just thought it might be useful for you if this is just gonna be a display look


edit: good night - i need some sleep zzZZ
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 04:02:49
if you don't mind my asking a couple more questions..

1) how can I display the album art of the currently playing song rather than the currently selected song?
    edit: never mind about this one, figured it out


2) is there a way to pin a look to the desktop so that it isn't brought to the front when clicked?
Title: fuzzy fonts in foo_looks
Post by: tk32 on 2004-01-21 04:04:15
i'll answer these questions tomorrow, ok

perhaps danZ might even beat me to it

sorry - it's 4:00am here in London
Title: fuzzy fonts in foo_looks
Post by: anathema on 2004-01-21 04:05:56
awesome, thanks again for being so helpful. sorry to keep you up.
Title: fuzzy fonts in foo_looks
Post by: danZ on 2004-02-02 16:30:50
Quote
sorry if this has been brought up before, but.. what's going on?

default text attributes are

antialiased
bold

tk32 has you covered on how to customize it all...