About Store Forum Documentation Contact



Post Reply 
Text style with fixed size
Author Message
Houge Offline
Member

Post: #1
Text style with fixed size
Hello!

I'd like to request fixed size of a text with fixed size (sounds nice ahaha) when it is placed on a button, tabs and other elements that increase text size inside it when adjusting height of an element. If text is created as non-fixed that looks ok and doesn't needs to be changed (it looks smooth and good when changing size), but when text has fixed size it becomes not nice.

When text has fixed size that means that text looks good only with the size that was used for creation, i think that's clear and that's the reason of creating fixed sized fonts.

Hope you got the idea, in other case i will make some screenshots.
11-12-2014 07:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: Text style with fixed size
Is Scalable Vector Graphics what you have in mind? just asking to clarify the idea.
11-12-2014 09:24 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #3
RE: Text style with fixed size
1. I have fixed size pixel font - Sans Serif 18.
   

2. I create a gui where i create a button with height 24 and text scale 0.75.
24*0.75 = 18 pixels, so i get what i want:
   

3. When i increase button height 48 pixels I expect getting this, because i have fixed size font:
   

4. But i get this and i can't say i'm happy:
   

P.S. of course i don't want such behaviour for scaling text smile it's only for fixed size fonts.
(This post was last modified: 11-13-2014 07:18 AM by Houge.)
11-13-2014 06:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #4
RE: Text style with fixed size
It would be logical that it would work as you are requesting, I don't see why people would enjoy scaled pixelated text : ) +1
11-13-2014 08:08 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Text style with fixed size
Per-pixel isn't really good for games.
What if you run the game on a 640x480 screen and then on a 2560x1400 screen?
11-14-2014 06:05 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #6
RE: Text style with fixed size
(11-14-2014 06:05 AM)Esenthel Wrote:  Per-pixel isn't really good for games.
What if you run the game on a 640x480 screen and then on a 2560x1400 screen?

Yes, that makes sense. But existence of per-pixel font also makes sense of my request, doesn't it? smile
(This post was last modified: 11-14-2014 11:47 AM by Houge.)
11-14-2014 07:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #7
RE: Text style with fixed size
If I'm not mistaken a lot of games out there are using fixed size fonts but that they add detail with the PPI.

This is a really good argument for the feature you're asking for, I definitely support this request.
11-17-2014 02:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #8
RE: Text style with fixed size
+1

I too have often found it hard to get font to look crisp and sharp like it does in say Word or VS for example. Very interesting link TBJokers.
11-17-2014 10:33 AM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #9
RE: Text style with fixed size
+1
I support the request, such feature will be helpful.
11-17-2014 11:04 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #10
RE: Text style with fixed size
Nothing here? Many people supported the request.
01-18-2015 09:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
khces Offline
Member

Post: #11
RE: Text style with fixed size
+1
I support the request, such feature will be helpful.
01-19-2015 06:07 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #12
RE: Text style with fixed size
+1
01-19-2015 08:42 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #13
RE: Text style with fixed size
Anything?
02-10-2015 09:20 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #14
RE: Text style with fixed size
I'm not in favor of this feature, but you can easily handle this on your own, by calling
TextStyle::setPerPixelSize()
inside D.screen_changed callback
02-10-2015 09:14 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #15
RE: Text style with fixed size
That doesn't work for me.
I do the same as i wrote in my 3rd post here, but when i call like this

Code:
void screen_changed(Flt old_width, Flt old_height)
{
    myBtn->getSkin()->button.text_style->setPerPixelSize();
}

Nothing happens.

UPD:
It's not the wayaround, because it changes TextStyle, but i need to change "Gui text scale".

UPD2:
(02-10-2015 09:14 PM)Esenthel Wrote:  I'm not in favor of this feature

But a lot of people (including the ones with binary and source licences) want this feature to be implemented. If i were alone, i would think that this feature is not needed by others smile

I believe it's not that hard to implement it like a flag somewhere in D. (like Bool D.perPixel_fixedFont, default false)
(This post was last modified: 02-11-2015 06:26 AM by Houge.)
02-11-2015 05:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply