FORUMS
Remove All Ads from XDA

[FONT][Magisk Module] Google Sans font - systemlessly

1,557 posts
Thanks Meter: 1,140
 
By Looki75, Senior Member on 11th September 2018, 10:51 AM
Post Reply Email Thread
Hello,

This is a module to install Google Sans font (aka Product Sans) systemlessly through Magisk.
You say: "Yet another Google Sans module"
Well sure, except that I made an important correction in the font design, read below...

So I wanted to install Google Sans font on my device.
You might know that is is not free to use...
All copies I could find on XDA and other places had the same issue.
The issue is that when you place a digit before a linebreak, if you click at the end of the line, the cursor is shown in the middle of the digit (see attached). I don't know if this glitch is only present on OnePlus 3T, but it drove me crazy...


Then I spent hours trying to find different copies of that font....
All copies had the same glitch on my device...
So I tried looking for the issue in the font files themselves... and I finally found that the linebreak character (unicode U+0A) had a width defined at 0... whereas in any other font, it has a non-0 value (value depends on the font).
I corrected this issue and now it is working perfect!!!


Also I corrected the colon for the lockscreen time (U+EE01 in Roboto-light).

So attached is what I believe to be the only Google Sans (aka Product Sans) font module that doesn't have this issue...

Tested only on my OnePlus 3T.
As usual: make backups... blah blah.... I cannot be held responsible... blah blah....


UPDATE: V7 with all missing glyphes imported from usual ROBOTO.
UPDATE: V8 with Underline FIX for all weights of font (thanks @RocketSauce83) + TWRP-flashable ZIP made available

Beware: the TWRP version is NOT the Magisk module. The TWRP version will directly write the files into /system/fonts and thus not only temper with your /system partition, but also definitely delete ROM-native font files!
If you decide to flash the TWRP version, you don't need to install the Magisk module... obviously...

Have fun!
Cheers
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180910-141529__01.jpg
Views:	9336
Size:	23.4 KB
ID:	4593408  
Attached Files
File Type: zip TWRP_Looki75_ProductSans_font_V8_UnderlineFIX.zip - [Click for QR Code] (17.95 MB, 1312 views)
File Type: zip MAGISK_Looki75_ProductSans_font_V8_UnderlineFIX.zip - [Click for QR Code] (17.82 MB, 280 views)
The Following 64 Users Say Thank You to Looki75 For This Useful Post: [ View ] Gift Looki75 Ad-Free
 
 
11th September 2018, 03:48 PM |#2  
vietnam100's Avatar
Senior Member
Flag Rhineland-Palantine
Thanks Meter: 104
 
More
Works fine on Xiaomi Mi Mix 2s and Redmi S2. Thanks

Gesendet von meinem MIX 2S mit Tapatalk
The Following User Says Thank You to vietnam100 For This Useful Post: [ View ] Gift vietnam100 Ad-Free
12th September 2018, 07:48 AM |#3  
Looki75's Avatar
OP Senior Member
Thanks Meter: 1,140
 
Donate to Me
More
Just wanted to add that if anyone has suggestions to further improve, please suggest.
Depending on the suggestion, I might decline (if too much work or if above my competence).

Cheers
The Following 3 Users Say Thank You to Looki75 For This Useful Post: [ View ] Gift Looki75 Ad-Free
12th September 2018, 02:26 PM |#4  
VincentJoshuaET's Avatar
Senior Member
Flag Angat
Thanks Meter: 424
 
More
Quote:
Originally Posted by Looki75

Just wanted to add that if anyone has suggestions to further improve, please suggest.
Depending on the suggestion, I might decline (if too much work or if above my competence).

Cheers

Thanks.

Maybe you can make a customized "Condensed" font style? IMO it will look better on some areas like the QS panel and the app drawer.

Also, is DroidSansFallback still needed? It's not mentioned on my ROM's fonts.xml, and I removed it from your module and it still works.

Sent from my Xiaomi Redmi Note 5 using XDA Labs
Attached Thumbnails
Click image for larger version

Name:	Screenshot_Pixel_Launcher_20180912-212300.jpg
Views:	4946
Size:	207.2 KB
ID:	4594198   Click image for larger version

Name:	Screenshot_Pixel_Launcher_20180912-212341.jpg
Views:	4814
Size:	107.1 KB
ID:	4594199  
The Following User Says Thank You to VincentJoshuaET For This Useful Post: [ View ] Gift VincentJoshuaET Ad-Free
12th September 2018, 02:32 PM |#5  
VincentJoshuaET's Avatar
Senior Member
Flag Angat
Thanks Meter: 424
 
More
Update: I just customized the module and removed the condensed font files. I think I prefer this. (But I guess more people who installed this module would prefer Google Sans everywhere)

Sent from my Xiaomi Redmi Note 5 using XDA Labs
The Following User Says Thank You to VincentJoshuaET For This Useful Post: [ View ] Gift VincentJoshuaET Ad-Free
12th September 2018, 02:37 PM |#6  
Looki75's Avatar
OP Senior Member
Thanks Meter: 1,140
 
Donate to Me
More
Quote:
Originally Posted by VincentJoshuaET

Thanks.

Maybe you can make a customized "Condensed" font style? IMO it will look better on some areas like the QS panel and the app drawer.

Also, is DroidSansFallback still needed? It's not mentioned on my ROM's fonts.xml, and I removed it from your module and it still works.

Sent from my Xiaomi Redmi Note 5 using XDA Labs

You're right, DroidSansFallback is probably not needed, but I included it just in case...

And, this is true: I couldn't find any condensed version of Google Sans / Product Sans so I just re-used the regular one.
The thing is: I am not a font designer, so I cannot design it. In FontForge, I could apply a 90% factor in the x-values, but then letter width would not be uniform depending if the line is horizontal, oblique or vertical...

If anyone can find and give me the condensed version of this font t(+variants italic, bold, bolditalic...) , I would be more than happy to rework it and include it in my module.
The Following User Says Thank You to Looki75 For This Useful Post: [ View ] Gift Looki75 Ad-Free
12th September 2018, 02:39 PM |#7  
VincentJoshuaET's Avatar
Senior Member
Flag Angat
Thanks Meter: 424
 
More
Quote:
Originally Posted by Looki75

You're right, DroidSansFallback is probably not needed, but I included it just in case...

And, this is true: I couldn't find any condensed version of Google Sans / Product Sans so I just re-used the regular one.
The thing is: I am not a font designer, so I cannot design it. In FontForge, I could apply a 90% factor in the x-values, but then letter width would not be uniform depending if the line is horizontal, oblique or vertical...

If anyone can find and give me the condensed version of this font t(+variants italic, bold, bolditalic...) , I would be more than happy to rework it and include it in my module.

I guess a good solution is to create another module that still uses the Roboto Condensed fonts (not replacing these fonts)? I already did it myself though, thanks.

Sent from my Xiaomi Redmi Note 5 using XDA Labs
12th September 2018, 02:40 PM |#8  
VincentJoshuaET's Avatar
Senior Member
Flag Angat
Thanks Meter: 424
 
More
For comparison:

Sent from my Xiaomi Redmi Note 5 using XDA Labs
Attached Thumbnails
Click image for larger version

Name:	Screenshot_Pixel_Launcher_20180912-214021.jpg
Views:	2346
Size:	105.5 KB
ID:	4594206  
16th September 2018, 06:23 PM |#9  
Saikotmirza's Avatar
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by VincentJoshuaET

For comparison:

How can I do this?
17th September 2018, 08:18 AM |#10  
MobyDuhFreak's Avatar
Senior Member
Thanks Meter: 48
 
More
Do I install this or this magisk module?
Which works best for Resurrection Remix 6.2.0?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_Magisk_Manager_20180917-081655.png
Views:	1758
Size:	177.8 KB
ID:	4598186  
17th September 2018, 08:51 AM |#11  
Looki75's Avatar
OP Senior Member
Thanks Meter: 1,140
 
Donate to Me
More
UPDATE: V7 with all missing glyphes imported from usual ROBOTO.
The Following 3 Users Say Thank You to Looki75 For This Useful Post: [ View ] Gift Looki75 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes