02-03-2014 09:40 AM - last edited on 02-03-2014 10:31 AM by Steve_T
I understand that blocking the font size it's not the corret way to make accessibility on the app. However as developer I can handle only one default font size because the increasing of size in the font style it's not handled for all the graphic objects. This mean that sometimes images and backgrounds are made for a specific font size and can't be used with another one.
That's why I want ask you: Is it'possible to handle the font size in a centralized way, like bar-descriptor settings or centralized app settings ?
Thanks in advance.
MOD EDIT: Subject changed to reflect a new topic
Solved! Go to Solution.
02-03-2014 10:22 AM
02-03-2014 10:31 AM
TextStyle Definition is probably what you are looking for...
02-03-2014 10:48 AM
I'm sorry. I thought that adding new post would be unapporpiated due to the existance of another with the same object.
However I already use this object in each component. More precisely I use textStyle()->setFontSize() to handle the font size of a Label. Althought this method works it's not the way to handle the font size that I'm looking for. I need a centralized way to control font not a way to control the font of a specific graphic object. If I use the method you suggested me I need to set the size for every new object I create. I need to set the size one time for all actual and future object without worring about the font size.
02-03-2014 11:00 AM
02-03-2014 12:00 PM
I tried to use the setFontSize method :
Label *LabelText1; ... LabelText1->textStyle()->setFontSize(FontSize::Sma
Hovever this doesn't prevent the OS from changing the size of the label when I do manually in the menu Settings->Display->Font Size.
How can I make the size not editable by the OS ?
02-03-2014 12:07 PM
02-03-2014 04:51 PM - edited 02-03-2014 04:52 PM
I knew that. Thank you.
I used many times in the code but I never realized until now that this doesn't prevent the OS to change the size of the text in the app if the relative settings in the Display sheet is changed. I can set a text to FontSize:mall but if I increase the size of the font on the OS settings the font size in the app increase too.
I'm wondering if does exist a way to set a text to a fixed size and avoid that changing in the OS settings affects the size of the font in the app.
02-03-2014 05:42 PM - edited 02-03-2014 05:47 PM
No you misunderstood what I was gettin at, you have to set it to a PointSize...
XXSmall to XXLarge are relative but specifying a point size is not.
TextStyle cardLabelXSmall; cardLabelXSmall.setFontSize(FontSize::PointValue); cardLabelXSmall.setFontSizeValue(4);
02-04-2014 04:21 AM
Ok perfect. You definetively solved my problem.
I have tried to use the value in the past but it didn't work because of this missing piece:
Thank you once again.