Changing font in TextView - Android Software Development

I am making a simple application now, what would depend on a custom font I got.
This is very important that only a part of the UI uses this font.
Is there ANY way to have these TextViews use my font instead of the built-in font? (I saw a few apps using their own font on different parts)

Related

freetype font in Windows Mobile? can be?

today i changed my pc font to freetype based GDI++ , it's more pretty than cleartype...
http://drwatson.nobody.jp/gdi++/
http://www.freetype.org/
so can our windows mobile phone's font change to freetype???
I hope it can be realized...
digifan said:
today i changed my pc font to freetype based GDI++ , it's more pretty than cleartype...
http://drwatson.nobody.jp/gdi++/
http://www.freetype.org/
so can our windows mobile phone's font change to freetype???
I hope it can be realized...
Click to expand...
Click to collapse
English version of above page: http://drwatson.nobody.jp/gdi++/index-en.html
Taken from here... http://www.howardforums.com/showthread.php?t=1215155
Changing The System Font
I haven't found a way to change the global system font (except replacing the tahoma.ttf and tahomabd.ttf files with a renamed version of the font you want). But it is possible to change some UI font by changing the "Nm" value in the following keys:
HKEY_LOCAL_MACHINE\SYSTEM\GDI\SYSFNT\ - Treeview and Listview items
HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\BarFnt\ - Menu text (on the bar itself)
HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\PopFnt\ - Menu items text
HKEY_LOCAL_MACHINE\SYSTEM\GWE\OOMFnt\Nm "Abadi MT Condensed Light" (In my case - this font renders interesting results in Contacts and Calendar, where bold characters appear in many fields. Easy to read, and small width.)
famewolf said:
English version of above page: http://drwatson.nobody.jp/gdi++/index-en.html
Taken from here... http://www.howardforums.com/showthread.php?t=1215155
Changing The System Font
I haven't found a way to change the global system font (except replacing the tahoma.ttf and tahomabd.ttf files with a renamed version of the font you want). But it is possible to change some UI font by changing the "Nm" value in the following keys:
HKEY_LOCAL_MACHINE\SYSTEM\GDI\SYSFNT\ - Treeview and Listview items
HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\BarFnt\ - Menu text (on the bar itself)
HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu\PopFnt\ - Menu items text
HKEY_LOCAL_MACHINE\SYSTEM\GWE\OOMFnt\Nm "Abadi MT Condensed Light" (In my case - this font renders interesting results in Contacts and Calendar, where bold characters appear in many fields. Easy to read, and small width.)
Click to expand...
Click to collapse
I think you didn't understand it.
it's font rendering, such as microsoft's cleartype, it's not relative to font...
thanks all the same...
reference:
http://www.opensource.apple.com/dar...reetype/freetype-2.3.5/builds/win32/visualce/
and
http://www.mail-archive.com/[email protected]/msg01243.html
http://dzolee.blogspot.com/2007/03/freetype-on-wince.html

[Q] how to change x2 font?

how to change the font? i mean, total conversion of the font, not only certain text, i want every single letters changed with a better font..help me
esad (SE Xperia X2) said:
how to change the font? i mean, total conversion of the font, not only certain text, i want every single letters changed with a better font..help me
Click to expand...
Click to collapse
you'd better follow the instructions from Merlin_reloaded in http://forum.xda-developers.com/showthread.php?t=334781&page=1
Code:
HOWTO: Change Default Font in WM6
I for one don't really like the default Tahoma font, so I thought I'd share how to change the default font.
Using the default Vista font "Segoe UI"
1. Copy your font file (usually *.ttf) into /Windows/Fonts. Be sure to note the INTERNAL name of the font (find it out by double-clicking on the file in Windows)
in this case "Segoe UI"
2. Using your favorite registry editor, navigate to HKEY_LOCAL_MACHINE\System\GDI\SysFnt
3. Find the key named "Nm". Replace what's in it (usually Tahoma) with the name of the font, in this case "Segoe UI"
4. Repeat III for "HKLM\SYSTEM\GWE\Menu\Menufnt\Barfnt" and "Popfnt"
4.1 Under HKEY_LOCAL_MACHINE\System\GDI\V1
- look for something like FontAliases. The keys inside represent the font "choices" -you have (which default to Tahoma), and look like Arial:-12. Change the value -from Tahoma* to Segoe UI*.
- Rinse and repeat.
5. Reset
And that's it ! The Segoe font renders much more easier to the eyes with Cleartype (and the spacing is really nice)
Do post newer font faces that look nice on QVGA screens
Originally Posted by Merlin_reloaded
or you simply install the font(ComicFonts.cab) below
thanks for the help..

[Q][NST] "Publisher defaults" and typeface change?

Hello,
Is there any way to change default font when using "Publisher defaults" option in stock reader app? I can change font size, but when I try to change typeface it always disables publisher defaults. I prefer to use some sans serif font for reading so it's why I'm asking. I know I can embed font in epub file but I'd prefer to not to do it. Of course if there is some code in CSS stylesheet that will force app to use different font I can use it.
Some books have awful CSS in them.
The "Duke Publishing" books that I get from the library are horrible.
I go in and delete the CSS sheet from inside the EPUB.
There are only a few reasons why you should ever have CSS in a book, for formatting quotes or poetry.
They should keep the CSS as generic as possible.
All I can recommend is going in and deleting/modifying the CSS.
You are completely right. Before I start to read a book I always modify CSS to my needs. It only includes margins, line spacing, indentations, justification and font size for headers. But unfortunately my settings are different from those available as defaults in Nook so I'm forced to use "Publisher defaults" option, what blocks font face change. I've tried to embed font in EPUB but it always looked horrible compared to default font so it's why I want to change it to one of sans serif defaults.
Link "Malabar" to the font you want
I believe that the default font for the Nook reader is Malabar. I personally prefer a slab serif font like Caecilia or Amasis. So I went into the /system/fonts directory and removed all of the Malabar fonts and linked each of the Malabar font file names to the equivalent Amasis font name. Now when I use "Publisher Defaults", I get the Amasis font. Doing this will require root of some description. I suspect this might be possible without permanently rooting the Nook, but as I want my rooted, I have not tried that.
It's good idea - didn't think about that before. I'm not sure but maybe it will be doable using ADB access. I think I can just change names of Malabar with Helvetica Neue (my preference) and that way I will still have 6 fonts to choose from with default Helvetica Neue.
Yes, you can do it with adb access (that is how I did it). I am not sure if renaming the fonts will work because I think the name of the font is imbedded in the file, but you can certainly try that. What I actually did was create a new directory called archive (/system/archive) and moved the Malabar fonts to that directory so I could easily restore them if I ever wanted to. I also move apks I don't want to run into that directory so I still have a copy I can easily access "just in case".

[Q] Launcher advice

Hello,
I've been using Nova Launcher for well over a year, but one thing missing for me is being able to control the fonts within the launcher more. There is no option to change the font size, which I find makes the fonts smaller than the system fonts and giving a not very fluid layout throughout the rom.
Can anyone recommend a similar launcher which has the option to change the font size and type?
It's a little frustrating when installing a launcher it also changes the font (often reducing the size) on the homescreen, while the system font in settings, dialer and contacts remain the same.
Anyone know where I'm coming from on this?
Thanks.

Backed up and replaced stock font, lock screen clock colon is a rectangle?

I backed up and replaced the stock fonts from system/fonts. Replaced Roboto-bold, light, lightitalic, regular, thin, and thinitalic and renamed the new ones to the roboto names. All the fonts were replaced properly after rebooting except for the lock screen colon. In the clock app and the status bar, the colon appears without issues. I don't mind reflashing the rom, it's just the stock Lollipop font bugs the daylights out of me!
Pteer Griffin said:
I backed up and replaced the stock fonts from system/fonts. Replaced Roboto-bold, light, lightitalic, regular, thin, and thinitalic and renamed the new ones to the roboto names. All the fonts were replaced properly after rebooting except for the lock screen colon. In the clock app and the status bar, the colon appears without issues. I don't mind reflashing the rom, it's just the stock Lollipop font bugs the daylights out of me!
Click to expand...
Click to collapse
After checking several fonts, it seems to me that roboto-thin is responsible for the clock colon, try restoring just that one.
*edit* I realise that the font Roboto-Thin is for the whole clock but have found myself a solution.
I am using Font Installer from Play to change my fonts on a rom without theme engine and after working out that the lock clock is Roboto-Thin I decided to try edit the font. I opened my chosen font with "Font Creator" and saw that there was a character called "undefined" that was a rectangle. So I copied the colon and pasted it over the rectangle, so now any character that is considered undefined should be represented by a colon. I saved the edited font and installed it. It works! Though any other undefined character will now be a colon.
I guess another solution would be to compare the dimensions of the alternative font colon with that of Roboto-Thin and make it the same.
How do u get font creator?
hizba said:
How do u get font creator?
Click to expand...
Click to collapse
I've used FontForge (free font editor) for Windows and have to edit the 'Roboto-Light.ttf'... and i have pasted the colon sign at the 0xEE01 position and exported the font as TrueType and replaced the font file in /system/fonts.
Now, the big ugly square is 'repaired' ... Look at the screenshots.
qayx said:
I've used FontForge (free font editor) for Windows and have to edit the 'Roboto-Light.ttf'... and i have pasted the colon sign at the 0xEE01 position and exported the font as TrueType and replaced the font file in /system/fonts.
Now, the big ugly square is 'repaired' ... Look at the screenshots.
Click to expand...
Click to collapse
You are a genius!
How could you find that it was that precise glyph which is the lockscreen colon?????
Anyhow, THANK YOU!!! :good:
qayx said:
I've used FontForge (free font editor) for Windows and have to edit the 'Roboto-Light.ttf'... and i have pasted the colon sign at the 0xEE01 position and exported the font as TrueType and replaced the font file in /system/fonts.
Now, the big ugly square is 'repaired' ... Look at the screenshots.
Click to expand...
Click to collapse
Thank you so much for this exact unicode. I've been replacing .notdef unicode with the colon, but every glyph which isn't defined in a font will use colon I'm still trying to find out why some character arts like ( ͡° ͜ʖ ͡°) render fine on stock font but custom font uses .notdef unicode. I searched for the individual unicodes in stock font, but they are empty just like in custom font. Could you please share your input on this?
PS: Sorry for resurrecting an old post :silly:
Thanks.! This saved me time trying to figure out which character to replace. I use fontforge on Linux and regenerated. So far so good, even though the font file is now nearly 100kb smaller now.
A little fontforge script that will:
- add the colon to 0xEE01
- scale the font (if your font is much larger or smaller than stock)
- convert the font to TrueType (if it's not one already).
Code:
#!/usr/bin/fontforge
i=1
while ( i<$argc )
Open($argv[i])
Select(0x003A)
Copy()
Select(0xEE01)
Paste()
SelectAll ()
Scale(100)
Generate($argv[i]:r + ".ttf")
i = i+1
endloop
Works on Linux, not sure if it'll work on Windows.

Categories

Resources