Skip to content

Additional samsung fonts to fix the preview error in the Layout Editor of Android Studio when using SESL/OneUI libraries

Notifications You must be signed in to change notification settings

tribalfs/android-studio-sec-fonts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Studio SEC Fonts

As described in this issue, using one of our One UI libraries (both sesl and the old Design lib) will cause issues with the Android Studio Layout Editor. This happens because Samsung's text styles use a custom fontFamily which is not available on AOSP. This repository contains a Samsung fonts pack that needs to be added to the AOSP ones included in Android Studio.

Usage

Download the repo archive and extract it.

Navigate to the "plugins/design-tools/resources/layoutlib/data/fonts" directory inside your Android Studio folder, then:

Before proceeding, make a backup of this "fonts" folder first as you need to (temporarily) restore this everytime you need update Android Studio

  • Add the all "*.tff" files from the "secfonts" folder of the downloaded archive.
  • Open the "fonts.xml" file and append to inside the <familyset> tag the contents from inside <familyset> tag of the "fonts.xml" found inside "secfonts" folder.

For Windows, you can run SecFontsFix.ps1 in Windows PowerShell to automatically perform the above including backing and and restoring the original "fonts" directory.

About

Additional samsung fonts to fix the preview error in the Layout Editor of Android Studio when using SESL/OneUI libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%