• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[FONT] Oreo 8.1 - Google's Product Sans for MIUI/AOSP/LOS/Stock ROMs

Search This thread

prathameshsd

Senior Member
Feb 7, 2013
319
1,223
main-qimg-09db5607827af4a1533129e6b8d59e18

Google introduced new font "Product Sans" in the Android Oreo 8.1 Developer Preview. This font is by default applied on the Settings app, lockscreen PIN entry and clock on the Pixel 2 series. These fonts are extracted directly from the system images and repacked into suitable files for installing. This should change your fonts system-wide across all apps and typefaces. All font packages are available at the end of the post as attachments.

Changelog
Code:
28/10/2017
Added fix for boxed font on lockscreen (gianton)
Added support for Resurrection Remix ROM
Added support for Pixel devices

27/10/2017
Updated Pixel clock Substratum theme for Nougat 7.x and Oreo 8.x (elmkzgirxp)

Tested & Working On
  • Android Versions - 5.x, 6.x, 7.x, 8.x
  • MIUI Versions - Global & Beta Builds of MIUI8, MIUI9
  • MIUI ROMs - Stock, Xiaomi.EU, Mi-Globe, MIUI Pro, Epic ROM
  • Stock Android ROMs - Sony, OnePlus, Lenovo, Moto devices
  • Custom ROMs - Some ROMs based on LineageOS & AOSP source

Screenshots

For MIUI8 & MIUI9 with TWRP
  • Download MIUI_TWRP_GoogleSans.zip
  • Boot into TWRP > Backup > Select System
  • Install > Select and flash the zip > Reboot > System
  • To revert back to original font, restore "system" using TWRP

For MIUI8 & MIUI9 without TWRP
  • Download MIUI_GoogleSans.mtz
  • Install MIUI Theme Editor : Playstore
  • Open Themes app > Themes > Import
  • Go to Internal Storage > MIUI > Theme > Select GoogleSans.mtz
  • Select the font from themes list and reboot to apply the font
  • To revert back to original font, apply default theme and reboot
  • You wont be able to see bold, italics fonts due to a bug on MIUI
  • Flashing the MIUI_TWRP_GoogleSans.zip using TWRP will fix this issue

For Stock/LineageOS/AOSP based ROMs with TWRP
  • Download TWRP_GoogleSans.zip (AOSP/LOS/Stock based ROM)
  • Download RR_TWRP_GoogleSans.zip (Resurrection Remix ROM)
  • Download PIXEL_TWRP_GoogleSans.zip (Pixel Devices)
  • Boot into TWRP > Backup > Select System
  • Install > Select and flash the zip > Reboot > System
  • To revert back to original font, restore "system" using TWRP (recommended) or flash TWRP_StockRoboto.zip
  • Facing boxed font on lockscreen? Flash this zip by gianton

Change the Lockscreen Font only using Magisk Manager and Substratum
  • This will just change the font on your lockscreen, and not your system font. (Do not flash TWRP font zip if using this method)
  • Your ROM should support OMS, if its Legacy the SystemUI might crash or phone might bootloop.
  • Flash the Magisk-GoogleSans.zip module using TWRP > Reboot > System.
  • Install Substratum Theme Engine : Playstore
  • Install Pixel+2+Lockscreen+Clock_1.1.apk substratum theme.
  • Open Substratum and select the theme and your Android Version.
  • Apply the overlay. Reboot phone if prompted.
  • If your phone bootloops or system UI crashes, flash the rescue package from Internal storage > Substratum folder using TWRP.

Credits
  • elmkzgirxp for creating Magisk module and Substratum theme
  • gianton for his Product Sans font zip which solves boxed font issue on the lockscreen, also check out his awesome thread for more fonts : Link
 

Attachments

  • TWRP_GoogleSans.zip
    1.3 MB · Views: 101,170
  • MIUI_GoogleSans.mtz
    304.4 KB · Views: 57,140
  • TWRP_StockRoboto.zip
    3.5 MB · Views: 24,097
  • Magisk_GoogleSans.zip
    354.7 KB · Views: 20,929
  • MIUI_TWRP_GoogleSans.zip
    1.7 MB · Views: 24,293
  • Pixel+2+Lockscreen+Clock_1.1.apk
    1.9 MB · Views: 27,435
  • RR_TWRP_GoogleSans.zip
    1.3 MB · Views: 11,978
  • PIXEL_TWRP_GoogleSans.zip
    1.3 MB · Views: 15,915
Last edited:

x1ld3n

Senior Member
May 7, 2016
183
64
I tried to flash TWRP_GoogleSans.zip
Device: ASUS Zenfone 2
ROM: Resurrection Remix 5.8.5
TWRP Version: 3.1.1.0

P.S. I manually replaced files from system/media/fonts with files from archive and it works. But i will have to do this after every ROM update. Flashing is much more easier.

Sent from my ASUS_Z008 using Tapatalk
 

prathameshsd

Senior Member
Feb 7, 2013
319
1,223

andybfmv96

Senior Member
Nov 19, 2012
518
42
Doesn't seem to be working on my install. (sultanxda's lineageos 14)

Having the same odd square issue on the lockscreen clock.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 180
    main-qimg-09db5607827af4a1533129e6b8d59e18

    Google introduced new font "Product Sans" in the Android Oreo 8.1 Developer Preview. This font is by default applied on the Settings app, lockscreen PIN entry and clock on the Pixel 2 series. These fonts are extracted directly from the system images and repacked into suitable files for installing. This should change your fonts system-wide across all apps and typefaces. All font packages are available at the end of the post as attachments.

    Changelog
    Code:
    28/10/2017
    Added fix for boxed font on lockscreen (gianton)
    Added support for Resurrection Remix ROM
    Added support for Pixel devices
    
    27/10/2017
    Updated Pixel clock Substratum theme for Nougat 7.x and Oreo 8.x (elmkzgirxp)

    Tested & Working On
    • Android Versions - 5.x, 6.x, 7.x, 8.x
    • MIUI Versions - Global & Beta Builds of MIUI8, MIUI9
    • MIUI ROMs - Stock, Xiaomi.EU, Mi-Globe, MIUI Pro, Epic ROM
    • Stock Android ROMs - Sony, OnePlus, Lenovo, Moto devices
    • Custom ROMs - Some ROMs based on LineageOS & AOSP source

    Screenshots

    For MIUI8 & MIUI9 with TWRP
    • Download MIUI_TWRP_GoogleSans.zip
    • Boot into TWRP > Backup > Select System
    • Install > Select and flash the zip > Reboot > System
    • To revert back to original font, restore "system" using TWRP

    For MIUI8 & MIUI9 without TWRP
    • Download MIUI_GoogleSans.mtz
    • Install MIUI Theme Editor : Playstore
    • Open Themes app > Themes > Import
    • Go to Internal Storage > MIUI > Theme > Select GoogleSans.mtz
    • Select the font from themes list and reboot to apply the font
    • To revert back to original font, apply default theme and reboot
    • You wont be able to see bold, italics fonts due to a bug on MIUI
    • Flashing the MIUI_TWRP_GoogleSans.zip using TWRP will fix this issue

    For Stock/LineageOS/AOSP based ROMs with TWRP
    • Download TWRP_GoogleSans.zip (AOSP/LOS/Stock based ROM)
    • Download RR_TWRP_GoogleSans.zip (Resurrection Remix ROM)
    • Download PIXEL_TWRP_GoogleSans.zip (Pixel Devices)
    • Boot into TWRP > Backup > Select System
    • Install > Select and flash the zip > Reboot > System
    • To revert back to original font, restore "system" using TWRP (recommended) or flash TWRP_StockRoboto.zip
    • Facing boxed font on lockscreen? Flash this zip by gianton

    Change the Lockscreen Font only using Magisk Manager and Substratum
    • This will just change the font on your lockscreen, and not your system font. (Do not flash TWRP font zip if using this method)
    • Your ROM should support OMS, if its Legacy the SystemUI might crash or phone might bootloop.
    • Flash the Magisk-GoogleSans.zip module using TWRP > Reboot > System.
    • Install Substratum Theme Engine : Playstore
    • Install Pixel+2+Lockscreen+Clock_1.1.apk substratum theme.
    • Open Substratum and select the theme and your Android Version.
    • Apply the overlay. Reboot phone if prompted.
    • If your phone bootloops or system UI crashes, flash the rescue package from Internal storage > Substratum folder using TWRP.

    Credits
    • elmkzgirxp for creating Magisk module and Substratum theme
    • gianton for his Product Sans font zip which solves boxed font issue on the lockscreen, also check out his awesome thread for more fonts : Link
    72
    For Those Who Faced Box Issue In Lock Sreen, Just Try Attached Zip Flash via TWRP.
    happy flashing :)
    7
    @SharkcpN As many of you( those who faced lockscreen box issue) would have noticed that the gianton's replacement font has slightly different appearance than the actual font, such as highly condensed font in the pulldown menu and the toast messages, I went ahead to find the actual font type that was causing the box issue in the OP's zip upload (basically finding out which font type was used for clock on lockscreen) , which turned out to be the Roboto-Light.ttf and replaced it with the gianton's Roboto-Light.ttf, thus resolving the issue and retaining all the OP's font types except Roboto Light. I have attached the zip for the TWRP method, for any other method, please just extract your category's zip file and replace the Roboto-Light.ttf file with that inside the gianton's zip file and then repackage them.
    4
    Found another missing thing.
    I'm getting this too.

    Hey, great place to end up finding bugs ;)

    So, let me explain what is wrong with the included fonts and how can you fix it:-

    OP's font: This font is missing quite a few characters (glyphs) that is generally included in a system font, such as " : " with the unicode #02F8 which isn't the regular colon (which is included hence I can type ':') but used in the lockscreen clock display and that is why it gets replaced by "box" symbol which stands for any unidentifiable symbol. The calculator's inverse minus, exponential x are also missing, hence your bug.

    Gianton's font: What gianton did was to replace the glyph(symbol) of the unidentifiable symbol from "box" to " : " which did fix the issue for the lockscreen but will replace every unidentifiable symbol with " : " now and the missing characters remains same in number as that in the OP's font.

    What can be done to achieve proper fix for now:-

    Option 1: You have to first identify the unicode of the characters that are missing (can be done on trial and error basis by comparing designs available in StockRoboto or any other "complete" font that resembles what you want instead of the box), then either you copy that unicode's design from another font class such as the included StockRoboto font or draw it yourself using any font editor (you can use FontForge) and add it throughout the OP's font family.
    Note: This is a very lengthy process as there are 19 font types in the OP font family, and there can be several symbols that resemble the symbol that you want to replace the box with ( there are atleast three more" : "with different unicode in StockRoboto).

    Option 2: Merge the OP's fonts with any other "complete" font (StockRoboto) using any font editor and let the OP's font symbols overwrite existing symbols in the "complete" font. This may sound simple but would trouble you with kerning issues as the OP's font doesn't have regular font sizes as compared to others i.e. size 16 in OP's font is much smaller than size 16 in StockRoboto and thus will result in abrupt size issues, if you know how to regularize the size throughout, this option is the way the go since it will include all the missing symbols by just one operation.

    All this only because Google won't release Product Sans to be open sourced as they use it for their branding (fair enough).

    Good luck to whoever is up for this mighty task.
    4
    Fix for boxed lockscreen font. Flash this zip by gianton in TWRP: Link
    Thread is updated with the fix.

    Those who are facing status bar icon shifting on Oreo 8.1 DP1 when time is changed is because Google changed the stuff on the status bar such rounding status bar icons and added extra padding on both sides.