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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added support for custom fonts

## [1.7.0] - 2025-12-16
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import android.view.Menu
import android.view.MotionEvent
import android.view.accessibility.AccessibilityNodeInfo
import android.view.animation.DecelerateInterpolator
import android.widget.PopupMenu
import androidx.appcompat.widget.PopupMenu
import androidx.core.graphics.drawable.toBitmap
import androidx.core.graphics.drawable.toDrawable
import androidx.core.net.toUri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import android.view.ContextThemeWrapper
import android.view.Gravity
import android.view.Menu
import android.view.View
import android.widget.PopupMenu
import androidx.appcompat.widget.PopupMenu
import androidx.core.graphics.drawable.toBitmap
import androidx.core.graphics.drawable.toDrawable
import androidx.core.view.MenuCompat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import org.fossify.commons.extensions.getContrastColor
import org.fossify.commons.extensions.getProperBackgroundColor
import org.fossify.commons.extensions.getProperTextColor
import org.fossify.commons.extensions.performHapticFeedback
import org.fossify.commons.helpers.FontHelper
import org.fossify.commons.helpers.ensureBackgroundThread
import org.fossify.commons.helpers.isSPlus
import org.fossify.home.R
Expand Down Expand Up @@ -147,21 +148,25 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) :
init {
ViewCompat.setAccessibilityDelegate(this, accessibilityHelper)

val customTypeface = FontHelper.getTypeface(context)
textPaint = TextPaint(Paint.ANTI_ALIAS_FLAG).apply {
color = Color.WHITE
textSize = context.resources.getDimension(org.fossify.commons.R.dimen.smaller_text_size)
setShadowLayer(2f, 0f, 0f, Color.BLACK)
typeface = customTypeface
}

contrastTextPaint = TextPaint(Paint.ANTI_ALIAS_FLAG).apply {
color = context.getProperTextColor()
textSize = context.resources.getDimension(org.fossify.commons.R.dimen.smaller_text_size)
setShadowLayer(2f, 0f, 0f, context.getProperTextColor().getContrastColor())
typeface = customTypeface
}

folderTitleTextPaint = TextPaint(Paint.ANTI_ALIAS_FLAG).apply {
color = context.getProperTextColor()
textSize = context.resources.getDimension(org.fossify.commons.R.dimen.medium_text_size)
typeface = customTypeface
}

dragShadowCirclePaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_launcher_label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="@dimen/launcher_icon_size"
android:layout_gravity="center_horizontal|bottom" />

<TextView
<org.fossify.commons.views.MyTextView
android:id="@+id/launcher_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Loading