[#1032] Prevent font ligatures on addresses

This commit is contained in:
Honza Rychnovský 2024-01-31 15:13:40 -08:00 committed by GitHub
parent 7630e4fcdf
commit 392689e676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 11 deletions

View File

@ -9,6 +9,10 @@ directly impact users rather than highlighting other key architectural updates.*
## [Unreleased]
### Fixed
- Fixed character replacement in Zcash addresses on the Receive screen caused by ligatures in the app's primary font
using the secondary font. This will be revisited once a proper font is added.
## [0.2.0 (541)] - 2024-01-30
- Update the Zcash SDK dependency to version 2.0.5, which improves the performance of block synchronization

View File

@ -71,8 +71,8 @@ private fun StyledBalanceComposablePreview() {
secondPart = "89012",
textStyles =
Pair(
ZcashTheme.extendedTypography.zecBalanceStyles.first,
ZcashTheme.extendedTypography.zecBalanceStyles.second
ZcashTheme.extendedTypography.balanceStyles.first,
ZcashTheme.extendedTypography.balanceStyles.second
),
modifier = Modifier
)

View File

@ -150,7 +150,8 @@ data class BalanceTextStyles(
data class ExtendedTypography(
val listItem: TextStyle,
// Grouping balances text styles to a wrapper class
val zecBalanceStyles: BalanceTextStyles,
val balanceStyles: BalanceTextStyles,
val addressStyle: TextStyle,
val aboutText: TextStyle,
val buttonText: TextStyle,
val checkboxText: TextStyle,
@ -179,7 +180,7 @@ val LocalExtendedTypography =
fontSize = 24.sp
),
// Note: the order here matters, be careful when reordering
zecBalanceStyles =
balanceStyles =
BalanceTextStyles(
first =
SecondaryTypography.headlineLarge.copy(
@ -204,6 +205,11 @@ val LocalExtendedTypography =
fontWeight = FontWeight.Bold
)
),
addressStyle =
SecondaryTypography.bodyLarge.copy(
// TODO [#1032]: Addresses can be shown with "×" symbols
// TODO [#1032]: https://github.com/Electric-Coin-Company/zashi-android/issues/1032
),
aboutText =
PrimaryTypography.bodyLarge.copy(
fontSize = 14.sp,

View File

@ -105,8 +105,8 @@ fun BalanceWidget(
secondPart = totalBalanceSplit.second,
textStyles =
Pair(
ZcashTheme.extendedTypography.zecBalanceStyles.first,
ZcashTheme.extendedTypography.zecBalanceStyles.second
ZcashTheme.extendedTypography.balanceStyles.first,
ZcashTheme.extendedTypography.balanceStyles.second
)
)
@ -143,8 +143,8 @@ fun BalanceWidget(
secondPart = availableBalanceSplit.second,
textStyles =
Pair(
ZcashTheme.extendedTypography.zecBalanceStyles.third,
ZcashTheme.extendedTypography.zecBalanceStyles.fourth
ZcashTheme.extendedTypography.balanceStyles.third,
ZcashTheme.extendedTypography.balanceStyles.fourth
)
)

View File

@ -267,11 +267,9 @@ private fun Address(
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingTiny))
// TODO [#163]: Ellipsize center of the string
// TODO [#163]: https://github.com/Electric-Coin-Company/zashi-android/issues/163
Text(
text = walletAddress.address,
style = ZcashTheme.typography.primary.bodyLarge,
style = ZcashTheme.extendedTypography.addressStyle,
color = ZcashTheme.colors.textDescription,
textAlign = TextAlign.Center,
modifier =