Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where to get certificates for font request?

Tags:

android

I've been reviewing the official documentation for adding the EmojiCompa library here https://developer.android.com/guide/topics/ui/look-and-feel/emoji-compat . It has this code:

public class MyApplication extends Application {
  @Override
   public void onCreate() {
     super.onCreate();
     FontRequest fontRequest = new FontRequest(
       "com.example.fontprovider",
       "com.example",
       "emoji compat Font Query",
       CERTIFICATES);
     EmojiCompat.Config config = new FontRequestEmojiCompatConfig(this, fontRequest);
     EmojiCompat.init(config);
   }
}

but it doesn't have any information on where/how to retrieve CERTIFICATES. I checked the font request section and wasn't able to find anything there either.

EDIT: To clarify, I see this:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="certs">
       <item>MIIEqDCCA5CgAwIBAgIJA071MA0GCSqGSIb3DQEBBAUAMIGUMQsww...</item>
    </string-array>
</resources>

But do not see any information on where MIIEqDCCA5CgAwIBAgIJA071MA0GCSqGSIb3DQEBBAUAMIGUMQsww... is retrieved, especially with regards to EmojiCompat.

like image 795
reactor Avatar asked Jan 28 '26 17:01

reactor


1 Answers

You can add certificates via Android Studio

  1. Tap on some view in your XML file such as MaterialButton
  2. Switch the Code tab to Design
  3. Scroll to All attributes open it and click on fontFamily attribute dropdown
  4. Pick More Fonts
  5. Choose one of the downloadable fonts and Android Studio creates for you font_certs.xml in your values folder
like image 81
torchik Avatar answered Feb 03 '26 00:02

torchik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!