Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

**Already available fonts**
- [Google Material Design Icons](https://github.com/google/material-design-icons)
- [Google Material Symbols](https://github.com/google/material-design-icons)
- [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font)
- [Fontawesome](https://fontawesome.com/)
- [Meteocons](http://www.alessioatzeni.com/meteocons/)
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ dependencies {
implementation project(':google-material-typeface-outlined-library')
implementation project(':google-material-typeface-rounded-library')
implementation project(':google-material-typeface-sharp-library')
implementation project(':material-symbols-typeface-outlined-library')
implementation project(':ionicons-typeface-library')
implementation project(':material-design-dx-typeface-library')
implementation project(':material-design-iconic-typeface-library')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2019 Mike Penz
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: "../../gradle/compile.groovy"

android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

defaultConfig {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
versionCode 10000
versionName "1.0.0.0"

resValue "string", "materialsymbols_version", "${versionName}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'com.mikepenz.iconics.typeface.library.materialsymbols'
}
if (project.hasProperty('pushall') || project.hasProperty('materialsymbolsonly')) {
apply from: "$rootDir/gradle-release.gradle"
}

dependencies {
implementation project(':iconics-typeface-api')
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class com.mikepenz.iconics.typeface.library.materialsymbols.OutlinedMaterialSymbols { *; }
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

OUTPUT_FONT_FILE=src/main/res/font/material_symbols_font.ttf
EDIT_KT_FILE=src/main/java/com/mikepenz/iconics/typeface/library/materialsymbols/OutlinedMaterialSymbols.kt

wget https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsOutlined%5BFILL,GRAD,opsz,wght%5D.ttf \
-O "${OUTPUT_FONT_FILE?}"

icon_names=$(wget https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsOutlined%5BFILL,GRAD,opsz,wght%5D.codepoints -O -)

SPLIT_REGEXES=(
^[0-9a-l].*$
^[^0-9a-l].*$ # This is basically the range m-z.
)

for i in "${!SPLIT_REGEXES[@]}"; do
lead="^.*BEGIN GENERATED CONTENT$((i+1))\$"
tail="^.*END GENERATED CONTENT$((i+1))\$"
split_regex="${SPLIT_REGEXES[$i]}"
echo "${icon_names}" \
| grep "${split_regex}" \
| awk '{print " mso_"$1"('\''\\u"$2"'\''),"}' \
| sed -i -e "/$lead/,/$tail/{ /$lead/{p; r /dev/stdin
}; /$tail/p; d }" \
"${EDIT_KT_FILE?}"
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright 2019 Mike Penz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
POM_NAME=Android-Iconics Material Symbols Typeface Outlined Library
POM_ARTIFACT_ID=material-symbols-typeface-outlined
POM_PACKAGING=aar
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
~ Copyright (c) 2019 Mike Penz
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="com.mikepenz.iconics.typeface.library.materialsymbols.Initializer"
android:value="androidx.startup"/>
</provider>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.mikepenz.iconics.typeface.library.materialsymbols

import android.content.Context
import androidx.startup.Initializer
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.IconicsHolder
import com.mikepenz.iconics.typeface.IconicsInitializer

class Initializer : Initializer<ITypeface> {
override fun create(context: Context): ITypeface {
IconicsHolder.registerFont(OutlinedMaterialSymbols)
return OutlinedMaterialSymbols
}

override fun dependencies(): List<Class<out Initializer<*>>> {
return listOf(IconicsInitializer::class.java)
}
}
Loading