Skip to content

Commit

Permalink
fonts: Add HarmonySans
Browse files Browse the repository at this point in the history
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: I9bd1758c3a6ee256942c6dbbbc6f2a2fc9364091
  • Loading branch information
adithya2306 authored and Vhmit committed Jan 5, 2025
1 parent 644ded5 commit 4660760
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 0 deletions.
20 changes: 20 additions & 0 deletions FontHarmonySansOverlay/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (C) 2023 ArrowOS Project
//
// 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.

runtime_resource_overlay {
name: "FontHarmonySansOverlay",
product_specific: true,
sdk_version: "current",
theme: "FontHarmonySans",
}
31 changes: 31 additions & 0 deletions FontHarmonySansOverlay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
/**
* Copyright (c) 2023 ArrowOS Project
*
* 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"
package="com.android.theme.font.harmonysans"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:category="android.theme.customization.font"
android:priority="1"/>

<application android:label="@string/font_harmonysans_overlay" android:hasCode="false">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="harmonysans,harmonysans-medium"/>
</application>
</manifest>
26 changes: 26 additions & 0 deletions FontHarmonySansOverlay/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 ArrowOS Project
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.
-->
<resources>
<!-- Name of a font family to use for body text. -->
<string name="config_bodyFontFamily" translatable="false">harmonysans</string>
<!-- Name of a font family to use for medium body text. -->
<string name="config_bodyFontFamilyMedium" translatable="false">harmonysans-medium</string>
<!-- Name of a font family to use for headlines. If empty, falls back to platform default -->
<string name="config_headlineFontFamily" translatable="false">harmonysans</string>
<!-- Name of the font family used for system surfaces where the font should use medium weight -->
<string name="config_headlineFontFamilyMedium" translatable="false">harmonysans-medium</string>
</resources>
20 changes: 20 additions & 0 deletions FontHarmonySansOverlay/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 ArrowOS Project
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.
-->
<resources>
<!-- HarmonyOS Sans font overlay -->
<string name="font_harmonysans_overlay" translatable="false">HarmonyOS Sans</string>
</resources>
1 change: 1 addition & 0 deletions product_packages_fonts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PRODUCT_PACKAGES += \
FontComfortaaOverlay \
FontCaviarDreamsOverlay \
FontExotwoOverlay \
FontHarmonySansOverlay \
FontSnigletOverlay \
FontSignikaOverlay \
FontOxaniumOverlay \
Expand Down

0 comments on commit 4660760

Please sign in to comment.