[Q] HowTo Scaling fonts permanently? - Desire HD Q&A, Help & Troubleshooting

Hi!
Spare Parts permit to reduce the scaling of fonts.
This is the logcat line:
Code:
Code:
03-31 10:32:07.202: INFO/ActivityManager(1314): Config changed: { scale=0.85 imsi=222/99 loc=it_IT touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=11 themeResource=null}
After a while (i.e. during a restart of ADW Launcher EX or a reboot) fonts scaling resets its value to 1.0.
Q: Is it possible to hardcoding this value by writing a config file (if it exist?)
PS: repeated thread. sorry for that. It will never suceed again. If i am OT tell me. New to DHD, proud to be here

LCD Density changer also does this http://forum.xda-developers.com/showthread.php?t=765639
Free version
Is also a lite version and fully sponsored by adds. The lite version only makes it possible to temporarily change a density setting. This setting will be undone when you reboot the phone. It uses "hot reboots" and no "cold reboots". It doesn't rely on the build.prop density parameter. Should in principle work on all devices. The free version is attached to this post
Full version
Full version (no adds + with the possibility to save the density and/or write it to the build.prop + desktop widgets for fast loading temporarily saved density setting) can be bought from from the Android Market (0.75 Euro). Search for "LCD Densitiy Changer"
I bought it for a SE X1 Mini Pro running 2.1 - it does what it says on the tin, and holds the density change through reboots etc.

paul c said:
LCD Density changer also does this http://forum.xda-developers.com/showthread.php?t=765639
Free version
Is also a lite version and fully sponsored by adds. The lite version only makes it possible to temporarily change a density setting. This setting will be undone when you reboot the phone. It uses "hot reboots" and no "cold reboots". It doesn't rely on the build.prop density parameter. Should in principle work on all devices. The free version is attached to this post
Full version
Full version (no adds + with the possibility to save the density and/or write it to the build.prop + desktop widgets for fast loading temporarily saved density setting) can be bought from from the Android Market (0.75 Euro). Search for "LCD Densitiy Changer"
I bought it for a SE X1 Mini Pro running 2.1 - it does what it says on the tin, and holds the density change through reboots etc.
Click to expand...
Click to collapse
Thank you for your prompt answer.
I have LCD Density changer. This program changes the density of the screen and this is a nice setting but is not what i search. Spare Parts reduce all and only the fonts for a factor (see in the "CODE" section in my first post) maintaining the density and all graphics unchanged.
Spare parts setting do the job, but sometime a process (unknown at the moment) do a font reset to the default dimension.
What i search is to know what configuration file has to be tweaked or modified to have this factor of reduction permanent.
Any idea on that?
Thanks in advance

-----------------------------

axl409 said:
scrivi su google "Cambiare dimensione e font dei caratteri", primo risultato. scusa ma non posso postare link.
i reply in italy, because who did the question is italian
Click to expand...
Click to collapse
Thanks a lot but is NOT what i mean. (i answer in english because is the official language of the site).
The link you provided explain Spare Parts. This is the application i use and do what i want. (read better post #1 and #3!).
BUT
Spare Parts does NOT maintain settings! after a while the font is reset to default!
For that reason (and this is the question) i want to know if the value of the font size can be hardcoded in some configuration file.

I don't know much about programming, but I think that at the moment you can't change default font scaling value, since it always defaults to "1" - it's hardcoded in source code and not being read from any configuration file. Take a look here: goo.gl/1M5ch , so you can see it by yourself.
I'd say that we can try changing line #314 to:
Code:
fontScale = getFloat("ro.test.fontScale", 1);
and see if allowing users to change fontScaling parameter in build.prop breaks any app or not.

I did some research on the code and the fix was much easier than I thought. Would you please test this change:
http://review.cyanogenmod.com/4931
and share your experience. It should make fontScale parameter set by SpareParts permanent over time. If it changes without a reason, please post the steps to reproduce the problem (which app caused the change etc.).

A patch to allow permanent font scaling has been merged into cyanogen source, it's available from nightly #64.

or you could modify build.prop yourself
ro.sf.lcd_density=240 (change to a lower value)
IE; ro.sf.lcd_density=130

Jonesjw362, I think you did not get the point of Font Scaling parameter either. The thing is that if you change your screen's density parameter, not only do fonts get scaled down but everything is smaller as well (like graphics) and it does not always look good. If you change Font Scaling though, only fonts get scaled up/down and it looks much prettier to my eyes.

kszaq said:
Jonesjw362, I think you did not get the point of Font Scaling parameter either.
Click to expand...
Click to collapse
i misunderstood sorry..

paul c said:
LCD Density changer also does this http://forum.xda-developers.com/showthread.php?t=765639
Free version
Is also a lite version and fully sponsored by adds. The lite version only makes it possible to temporarily change a density setting. This setting will be undone when you reboot the phone. It uses "hot reboots" and no "cold reboots". It doesn't rely on the build.prop density parameter. Should in principle work on all devices. The free version is attached to this post
Full version
Full version (no adds + with the possibility to save the density and/or write it to the build.prop + desktop widgets for fast loading temporarily saved density setting) can be bought from from the Android Market (0.75 Euro). Search for "LCD Densitiy Changer"
I bought it for a SE X1 Mini Pro running 2.1 - it does what it says on the tin, and holds the density change through reboots etc.
Click to expand...
Click to collapse
LCD Density changer makes colors and icons look ****ed up

Related

[win32] API - New Sense interface Look 'n Feel V1.6.4 (01/28/11)

I have created a win32 API for C++ that mimics HTC's Sense UI Look 'n Feel... More informations on my website: charlie-soft.com
DOCUMENTATION : http://charlie-soft.com/Software/Manila_SDK/html/
This SDK is designed for speed: .NET applications are usually very slow to load and not fluid. I use some tricks to improve speed, like drawing only area having changes, scrolling without backbuffer or creating textures for text (GDI text drawing was slower…).
What’s in the box:
PNG resources for VGA/WVGA. They can be easily modified. SDK will resize automatically the resources if your device has a smaller (or higher) resolution!
Design your app for VGA, the SDK will adjust the layout for other resolutions!
Full Finger Control.
Source files (.cpp and .h) of library.
Source files of example.
Class:
MyEditControl: Edit box with different width. Easy get and set text. SIP detection: scroll Edit area.
MyItem: Button (3 types), checkboxes and switch (TripleState!). Event on click, visibility and state can be changed/get easily.
MyPanel : This element is not visible but is used to bring together elements. This element can have a title and dotted separator between each element.
ChildSection : Contains a subsection which is displayed with a sliding effect.
MyLabel: Print text with different font and color.
MyPictureBox: To print image (png, jpg, bmp, gif…)
MySelector: Like the HTML select. Scroll screen if list is out of screen (see video below).
Section: A section is a panel which can be scrolled up/down. It contains the different elements.
MessageBoxSense: Four type of messagebox: info, Ok/Cancel, Abort/Retry and Yes/No.
MySlider: A simple slider of any size... The min and max values can be changed easily, as the cursor position.
Change log
V1.6.4
Added the possibility of multilines in edit control
V1.6.3
Added possibility to add picture to slider of ChildSection...[bug solved]
Explorer bug solved
V1.6.2
Added an event when user click on screen...
V1.6.1
Memory usage improved
V1.6
Loading of image is now safe (use video memory by default but if problems use device memory)
File Explorer
Icons
Speed and memory improvement
V1.5
just add possibility to change color of text for hover and selected...
Minor bug changes:
items out of screen no longer try to redraw
text of items recompute their size when changing
background color is correctly changed
The SDK is now multi thread safe!
Add the possibility to right clicks (long press)
Add the possibility to hook windows message (WM_ACTIVATE for example)
Add the possibility to have a bottom bar.
Add the possibility to have a background image (landscape and portrait).
If the app is allready started, close the new instance and show the previous one.
MySelector can be scrolled if the list is too long.
Text is now printed with alpha transparency.
Compatible with any character (hebrew, vietnamese...).
MyPictureBox can now be stretched.
Memory usage reduced.
V1.4
Minor bugs fixed
Add the possibility to show MessageBox without a main application.
V1.3
Background can be transparent ! (see this app for demo)
Native drawing (DirectDraw was too slow in landscape)
Slider can have a force feedback (see this app for demo)
V1.2
MySlider added
drawing process rewrited: less redraw->less computation->less CPU utilization -> battery consumption reduced
Loading optimisation
The layout is now independent of screen resolution!
top taskbar is occassionally cleared [fixed]
White screen, touching the panel brings it back [fixed]
landscape items position incorrect [fixed]
V1.1
landscape compatible
Abort/Retry added to MessageBoxSense
TripleState Checkboxes and OnOffItems added
FAQ
is QVGA resolution supported?
Yes, SDK will find the correct resolution and select the appropriate resource resolution. The SDK will delete the other resources...
have you planned to extend MessageBox types to Abort/Retry?
Yes, to create one:
MessageBoxSense::show(L"Hello",L"Try again ?", MESSAGE_ABORTRETRY);
is this landscape compatible?
Yes but having refresh rate issue. Seems to be a DirectDraw problem (S2U2 was subject to the same issue...)
If someone know how to solve this problem, send me a message !
Back button too slow.
You can change the speed anim using this function: changeSpeed(double nbMilisecond)
why aren't you including some TripleState Checkboxes and OnOffItems ?
Both are now included:
new MyItem(1,5,15,ITEM_IS_CHECKBOX,ITEM_THIRD_STATE,L"My third checkbox (Third state)");
Other apps
Wake on Wan is a new app which use this SDK. Sources are available!
Quick shutdown is a software which use this SDK too. It can turn off, restart or set the phone in sleep mode. Sources are also available!
"
Sense SDK win32 C++
For informations about SDK (installation, use compile...), see here: http://charlie-soft.com/Software/Manila_SDK/html/
Good work ! thanks for sharing hope devs will use it.
Hello my friend !
Great work !
( C'était exactement ce que je cherchais en c++ pour mes MFC smart device !!! )
Great Work, Thx for the source!!
Really great work!
but I have two questions:
- is QVGA resolution supported?
- have you planned to extend MessageBox types to Abort/Retry?
thank you
regards
NIce work
Altough i don't really know what todo with it... i instalt the example.cab and it was really smooth!
Only one thing if i go to other controls and i want to change the value then the onscreen keyboard should show up right? But it doesn't.... So i slide my qwerty keyboard open, and in landscape i get an error message: DDERR_SURFACELOST(back buffer)
I dont know what it means... is this landscape compatible?
Good job man !
Nice works !
I just have a feedback, I find too slow the animation when you click on the "back" button, is there is a way to speed it up ? (or disable simply the animation)
SDK Manila
Hello all !
I will try to answer all your questions. So :
- is QVGA resolution supported?
No but easy to implement... Just resize resources to correct resolution. I will post resources shortly.
- have you planned to extend MessageBox types to Abort/Retry?
If it's something wanted, I will do it.
- is this landscape compatible?
No, not yet. But will be in next release!
-Back button too slow.
I will add a method to set the speed of animation... in the next release
-Bug with hardware keyboard
The onscreen keyboard don't show up and I don't know why... I will look around for a fix.
If a developer wants to translate .NET applications into C++, feel free to post I will try to help you!
There is still lot of work, but I will try to do this quickly!
petititi said:
- have you planned to extend MessageBox types to Abort/Retry?
If it's something wanted, I will do it.
Click to expand...
Click to collapse
thank you for quick reply. I need this extension for my app "htc menu loader" (link in signature) to migrate from .net to c++
again, really great work. You are making something that HTC should have done months ago.
Great project !
I don't know if you notice but I disabled the bottom taskbar... Do you think that I should add the possibility to enabled it? I saw that your application needed one...
I hope you will find my SDK easy to use !
Hey, this looks awesome.
Question though: I'm just shy of clueless when it comes to making an actual working app. Is there any place I can go to read/learn the coding I will need to actually use this?
Application win32 c++
You can use the example application included into the SDK to learn basic stuff or you can download this application: WakeOnWan. It’s based on my SDK (here are the sources).
You need some basic knowledge about Object-oriented programming and C language. I try to explain how to use the SDK in the example using comments or on my webpage.
I will also post a short tuto in second post...
Very, very nice! The demo runs very smoothly on my stock Touch Pro 2.
petititi said:
You can use the example application included into the SDK to learn basic stuff or you can download this application: WakeOnWan. It’s based on my SDK (here are the sources).
You need some basic knowledge about Object-oriented programming and C language. I try to explain how to use the SDK in the example using comments or on my webpage.
I will also post a short tuto in second post...
Click to expand...
Click to collapse
Awesome thanks!
What's sad, is when I was young, I used to be able to code in C. Made my first video game when I was 6 on a Commodore 64 (ok i dated myself here) Now, can't remember very much
C++ ? It's just like riding a bike!
Hatefly said:
Awesome thanks!
What's sad, is when I was young, I used to be able to code in C. Made my first video game when I was 6 on a Commodore 64 (ok i dated myself here) Now, can't remember very much
Click to expand...
Click to collapse
I'm sure you can!
It's just like riding a bike - you never really forget how. And we are here to help you to refresh your memory.
petititi said:
I'm sure you can!
It's just like riding a bike - you never really forget how. And we are here to help you to refresh your memory.
Click to expand...
Click to collapse
Sweet thanks! Just downloaded an ebook on c programing.
Sounds (and looks) great, although there are still to many glitches (like not working in landscape etc.) which are preventing me from using this package.
But I have one question, why aren't you (all) including some TripleState Checkboxes and OnOffItems ?
I need them often but you cant find such controls online - not to speak of sense.
TripleState Checkboxes ?
Hello,
the TripleState Checkboxes is a simple feature I can add. To be sure, TripleState Checkboxes will looks like:
And tripleState On/Off:
I will include them in the next release... Be patient, the next release is coming soon and adds support for portrait and fixes a few bugs...

[Q] Editing settings.db for font size adj?

Hi, the ICS clock screen has a bit of an issue, the fonts are to big. I'm using it in dGB and oxygen and it comes included in another ROM.
If I change the font size in spare parts its fine and I prefer the whole overall Size difference. unfortunately after reboot the settings go back again to normal size.
The actual setting takes place in data/com.android.settings.providers - settings.db
It changes font_scale to 0.95 from 1.0
Is there a build.prop I can add to keep it at 0.95 at boot? I've tried ro.com.font_scale =0.95 as the date format and some other settings in there (settings.db) are referenced that way in build.prop.
No joy.
Would appreciate some help here, its doing my head in.
try to reduce your lcd density instead.
That's a bit overkill, its really only one app. And I can change it fine (to 0.95) with spare parts. Just doesn't stick.

Adapt app to all screen size

Hi, I'm developing a material design calculator but I have a problem: How could I do to adapt buttons to alla screen size? For example on mi Xperia S buttons are too small! If you want screenshot or the xml code tell me it. I'm sorry for my bad english I'm only 14 XD
Hi,
You need to use the size in DP instead of PX and use max/min size attribute on your XML file
Start using dp (density independent pixels), they are designed to scale a graphic to "real-life size" for example 48dp is a little bigger than the size of our fingers and is the recommended size for buttons in order to be easily touchable.
If you need more info about density independent pixels read from Android Developer's page "Supporting Different Densities" (I'm new here and I can't post URLs, just google it).
At first you need to read "Support multiple screens" article on android developer website.
For my opinion the best way is to use wrap_content match_parent instead of pixels.
Hi,
Since you mentioned you're making a calculator app, while using "dp" for button dimensions, I also suggest you look into using "weights".
These can evenly space out your buttons in a layout.
To use weights in Android, your content must be wrapped in a LinearLayout.

Amending DPI On Device...

Well heres one for the books.
I set my DPi to 400 on the device. Went to put it into power saving mode and it changed the screen density to HD which is fine.
However with the Small condensed option selected under display, it now prevents ANY system modifications to the DPI settings which is actually insane! :/
Any ideas on a work around? Im rooted and even amending the Build.prop and using an app seems to kill getting a lower DPI settting
This is a known issue. You have to use adb shell wm density XXX, and avoid changing resolution in the future.
Yeah but when setting up the device you have to choose either Small or Large Condensed Text :/
I'm not sure what problem you're having. I had my content scaling set to small, and text size set to small/very small (can't remember), and just did an adb shell & wm density 520 without a problem.
Same thing happening to me. I tried to change it via build.prop and by the adb shell command. Still at 640.
can someone tell me what the STOCK DPI values are for "standard" and "condensed" mode? (it can be checked with DPI Checker from play store)

Question Letterboxed apps (not filling screen) – wrong/limited aspect ratio?

Does anybody have any apps that don't fill the entire screen and have a big black empty area at the bottom? They work fine otherwise but just don't use the whole screen.
FWIW these are APKs I brought from the old phone with 18.5:9 ratio vs 21:9 for this one, which I cannot update because they've been abandoned/obsoleted by the developer. I suspect they've declared a maximum screen ratio in their manifest so that's why they're letterboxed but I'm not sure how I can override it (without modifying the APK).
On Samsung ROMs you get an automatic prompt to override (and a per-app override in the settings) but I can't find anything like that on Sony.
I've extracted the manifest from 3 such apps and indeed don't see anything about android:maxAspectRatio and android:resizeableActivity="false" in any of them.
Adding two screenshots to explain what I'm talking about. They're from one of the affected apps (Agile – com.sauce.agile), letterboxed to 16:9 due to the 21:9 screen of the phone. Notice the large black area at the bottom in portrait and the black bands on the sides in landscape.
Found a blog post that explains:
We recommend that you design your app to support aspect ratios of 2.1 or higher. For this, you would add the following to the <application> element:
<meta-data android:name="android.max_aspect" android:value="2.1" />
If you don't set a value, and android:resizeableActivity is not true, then the maximum aspect ratio defaults to 1.86 (roughly 16:9) and your app will not take advantage of the extra screen space.
Click to expand...
Click to collapse
Guess that explain what's going on with the affected apps. Now to see if this can be overwritten at runtime somehow...
I found an easy method for fixing this problem using the APK Editor app (also attached to this post) (which, ironically, is itself affected by letterboxing).
Open APK Editor.
Tap "Select Apk from App" if you want to fix an already installed app, or "Select an Apk File" if you have the .apk but it's not installed.
Select "Common Edit".
Scroll all the way to the bottom to "Target SDK Version" and replace it with the value 24.
Press "Save".
That's it, APK Editor will save a modified .apk to ApkEditor/tmp/gen_signed.apk which doesn't have the letterboxing problem anymore.
Please note that the modified .apk has the exact same name and version as the installed app so if it's already installed you won't be able to install the modified one (the installer thinks you're trying to install the same app). There are several solutions:
If you don't care about losing your app data, just uninstall it then install the modified .apk.
You can take a backup with ADB or an app like Titanium, MyBackup Pro or OandBackupX, uninstall the app, install the modified one, then restore just the app data.
When you edit the app with APK Editor bump the Version Code and Version one number up. This will make the installer think you're installing an updated version. Probably a good idea to do this anyway.
Read this in case the target SDK version doesn't fix the problem!
As I wrote above, the letterboxing appears for apps that don't have an explicit android.max_aspect declared in their manifest. If that's the case, Android checks to see if the app manifest has declared android:resizeableActivity instead. If it didn't do that either, SDK versions before 24 would assume the activity to NOT be resizeable (default value boolean "false") and use letterboxing. This is what's happening for the apps I listead in post #2. For them the fix is easy: change the SDK version to 24; starting with that version the default is "true" for resizeable activity, which removes the letterboxing.
If changing the target SDK version didn't work for you, or if the app was already targeting 24 or later, it means it's probably declaring either android.max_aspect or android:resizeableActivity in its AndroidManifest.xml. You will need to use APK Editor to do a "Simple Edit" instead of "Common Edit", save a copy of the AndroidManifest.xml file, edit it (please make sure you edit it with a text editor that won't mess it up), set android.max_aspect to 2.1 and/or android:resizeableActivity to true (or remove them, but if you do make sure the target SDK version is 24 or greater) then replace the original AndroidManifest.xml in APK Editor and save the modified .apk.

Categories

Resources