mirror of
https://github.com/googlefonts/noto-emoji.git
synced 2025-07-08 13:36:40 +00:00
Merge branch 'master' of https://github.com/c1710/blobmoji
This commit is contained in:
commit
cc73a9967e
5 changed files with 56 additions and 8 deletions
|
@ -14,6 +14,7 @@ Another thing is that this emoji set includes some emojis and ZWJ-sequences whic
|
||||||
Please note that I did not create most of the emojis. You can find an overview of the changes I made in the file CHANGES.txt
|
Please note that I did not create most of the emojis. You can find an overview of the changes I made in the file CHANGES.txt
|
||||||
|
|
||||||
Most information on this fork will be included in the [Wiki](https://github.com/C1710/blobmoji/wiki). There you'll find more detailed build instructions and other helpful information on how to use this font and much more.
|
Most information on this fork will be included in the [Wiki](https://github.com/C1710/blobmoji/wiki). There you'll find more detailed build instructions and other helpful information on how to use this font and much more.
|
||||||
|
If you want to use this font - there's a [Wiki page](https://github.com/C1710/blobmoji/wiki/Installation-Usage) :D
|
||||||
|
|
||||||
(_[Emojipedia®](https://emojipedia.org) is a registered trademark of Emojipedia Pty Ltd_)
|
(_[Emojipedia®](https://emojipedia.org) is a registered trademark of Emojipedia Pty Ltd_)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ buildscript {
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ ext {
|
||||||
libraryDescription = 'An EmojiCompat implementation using files from a local file or a file inside your assets directory'
|
libraryDescription = 'An EmojiCompat implementation using files from a local file or a file inside your assets directory'
|
||||||
siteUrl = 'https://github.com/c1710/blobmoji'
|
siteUrl = 'https://github.com/c1710/blobmoji'
|
||||||
gitUrl = 'https://github.com/c1710/blobmoji.git'
|
gitUrl = 'https://github.com/c1710/blobmoji.git'
|
||||||
libraryVersion = '1.0.7'
|
libraryVersion = '1.0.11'
|
||||||
developerId = 'c1710'
|
developerId = 'c1710'
|
||||||
developerName = 'Constantin A.'
|
developerName = 'Constantin A.'
|
||||||
developerEmail = 'c1710.apps@outlook.com'
|
developerEmail = 'c1710.apps@outlook.com'
|
||||||
|
@ -33,8 +33,8 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 7
|
versionCode 12
|
||||||
versionName "1.0.7"
|
versionName "1.0.12"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation 'com.android.support:support-emoji:27.1.1'
|
implementation 'com.android.support:support-emoji:27.1.1'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: 'https://raw.githubusercontent.com/numetriclabz/jcenter/master/installv.gradle'
|
apply from: 'https://raw.githubusercontent.com/numetriclabz/jcenter/master/installv.gradle'
|
||||||
|
|
Binary file not shown.
|
@ -23,15 +23,16 @@ import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.RequiresApi;
|
import android.support.annotation.RequiresApi;
|
||||||
import android.support.text.emoji.EmojiCompat;
|
import android.support.text.emoji.EmojiCompat;
|
||||||
import android.support.text.emoji.MetadataRepo;
|
import android.support.text.emoji.MetadataRepo;
|
||||||
import android.util.Log;
|
|
||||||
import android.support.v4.util.Preconditions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple implementation of EmojiCompat.Config using typeface assets.
|
* A simple implementation of EmojiCompat.Config using typeface assets.
|
||||||
* Based on:
|
* Based on:
|
||||||
* https://android.googlesource.com/platform/frameworks/support/+/master/emoji/bundled/src/main/java/android/support/text/emoji/bundled/BundledEmojiCompatConfig.java
|
* https://android.googlesource.com/platform/frameworks/support/+/master/emoji/bundled/src/main/java/android/support/text/emoji/bundled/BundledEmojiCompatConfig.java
|
||||||
* Changes are marked with comments. Formatting and other simple changes are not always marked.
|
* Changes are marked with comments. Formatting and other simple changes are not always marked.
|
||||||
|
* @deprecated Please use {@link FileEmojiCompatConfig#createFromAsset(Context, String)} instead
|
||||||
|
* for greater flexibility.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AssetEmojiCompatConfig extends EmojiCompat.Config {
|
public class AssetEmojiCompatConfig extends EmojiCompat.Config {
|
||||||
// The class name is obviously changed from the original file
|
// The class name is obviously changed from the original file
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,52 @@ public class FileEmojiCompatConfig extends EmojiCompat.Config {
|
||||||
*/
|
*/
|
||||||
private static final String FONT_FALLBACK = "NoEmojiCompat.ttf";
|
private static final String FONT_FALLBACK = "NoEmojiCompat.ttf";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new FileEmojiCompatConfig based on an asset.
|
||||||
|
* <p/>
|
||||||
|
* This means that you can have the flexibility of {@link AssetEmojiCompatConfig}
|
||||||
|
* while giving your users the choice to optionally override the font.
|
||||||
|
* <p/>
|
||||||
|
* The default location for a substituting font is
|
||||||
|
* {@code /sdcard/Android/data/your.apps.package/files/EmojiCompat.ttf}.
|
||||||
|
*
|
||||||
|
* @param context The app's context is needed for several tasks
|
||||||
|
* @param assetPath The path inside the {@code assets} folder for the default font file
|
||||||
|
* @return A FileEmojiCompatConfig which will use the given font by default
|
||||||
|
*/
|
||||||
|
public FileEmojiCompatConfig createFromAsset(@NonNull Context context,
|
||||||
|
@Nullable String assetPath) {
|
||||||
|
if (assetPath != null) {
|
||||||
|
FileEmojiCompatConfig config = new FileEmojiCompatConfig(context,
|
||||||
|
new File(context.getExternalFilesDir(null), "EmojiCompat.ttf"),
|
||||||
|
assetPath);
|
||||||
|
config.replaceAllOnFallback = true;
|
||||||
|
return config;
|
||||||
|
} else {
|
||||||
|
return createFromAsset(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new FileEmojiCompatConfig based on an asset.
|
||||||
|
* <p/>
|
||||||
|
* This means that you can have the flexibility of {@link AssetEmojiCompatConfig}
|
||||||
|
* while giving your users the choice to optionally override the font.
|
||||||
|
* <p/>
|
||||||
|
* The default location for a substituting font is
|
||||||
|
* {@code /sdcard/Android/data/your.apps.package/files/EmojiCompat.ttf}.
|
||||||
|
* <p/>
|
||||||
|
* The default name for the Assets font is {@code NoEmojiCompat.ttf}.
|
||||||
|
* If you wish to use a different name for this font, please use
|
||||||
|
* {@link #createFromAsset(Context, String)}.
|
||||||
|
*
|
||||||
|
* @param context The app's context is needed for several tasks
|
||||||
|
* @return A FileEmojiCompatConfig which will use the given font by default
|
||||||
|
*/
|
||||||
|
public FileEmojiCompatConfig createFromAsset(@NonNull Context context) {
|
||||||
|
return createFromAsset(context, FONT_FALLBACK);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new configuration for this EmojiCompat
|
* Create a new configuration for this EmojiCompat
|
||||||
* @param path The file name/path of the requested font
|
* @param path The file name/path of the requested font
|
||||||
|
@ -238,6 +284,7 @@ public class FileEmojiCompatConfig extends EmojiCompat.Config {
|
||||||
MetadataRepo.create(assetManager, FONT_FALLBACK);
|
MetadataRepo.create(assetManager, FONT_FALLBACK);
|
||||||
loaderCallback.onLoaded(resourceIndex);
|
loaderCallback.onLoaded(resourceIndex);
|
||||||
} catch (Throwable t2) {
|
} catch (Throwable t2) {
|
||||||
|
Log.e(TAG, "Even the fallback font couldn't be loaded", t2);
|
||||||
loaderCallback.onFailed(t);
|
loaderCallback.onFailed(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue