diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DisplayOts.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DisplayOts.kt
index 43ffee19e3..22c3720962 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DisplayOts.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DisplayOts.kt
@@ -75,11 +75,18 @@ fun DisplayOts(
},
whenPending = {
// The stamp icon plus an ellipsis: attestation requested, not yet
- // anchored. The content description carries the words.
+ // anchored. The content description carries the words; tapping
+ // explains what is being waited on.
HeaderPill(
symbol = MaterialSymbols.OpenTimestamps,
text = "…",
contentDescription = stringRes(R.string.timestamp_pending_short),
+ onClick = {
+ accountViewModel.toastManager.toast(
+ R.string.ots_info_title,
+ R.string.ots_info_pending_description,
+ )
+ },
)
},
)
diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml
index 9005e9f7e7..a9ed842bdd 100644
--- a/amethyst/src/main/res/values/strings.xml
+++ b/amethyst/src/main/res/values/strings.xml
@@ -3021,6 +3021,7 @@
Timestamp Proof
There\'s proof this post was signed sometime before %1$s. The proof was stamped in the Bitcoin blockchain at that date and time.
+ A timestamp proof for this post has been requested and is waiting to be stamped in the Bitcoin blockchain. It usually completes within a few hours.
Edit Article
Edit Post
diff --git a/commons/src/commonMain/composeResources/font/material_symbols_outlined.ttf b/commons/src/commonMain/composeResources/font/material_symbols_outlined.ttf
index d75ba235aa..aed61e63f4 100644
Binary files a/commons/src/commonMain/composeResources/font/material_symbols_outlined.ttf and b/commons/src/commonMain/composeResources/font/material_symbols_outlined.ttf differ
diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/HeaderPill.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/HeaderPill.kt
index 068a06e7d9..6fcb46946e 100644
--- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/HeaderPill.kt
+++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/HeaderPill.kt
@@ -70,7 +70,7 @@ fun HeaderPill(
symbol = symbol,
contentDescription = contentDescription,
tint = iconTint ?: MaterialTheme.colorScheme.placeholderText,
- modifier = Modifier.size(11.dp),
+ modifier = Modifier.size(13.dp),
)
Text(
text = text,
diff --git a/tools/material-symbols-subset/add_custom_glyphs.py b/tools/material-symbols-subset/add_custom_glyphs.py
index 158c98e438..67352f537f 100644
--- a/tools/material-symbols-subset/add_custom_glyphs.py
+++ b/tools/material-symbols-subset/add_custom_glyphs.py
@@ -30,18 +30,17 @@ from fontTools.ttLib import TTFont
HERE = os.path.dirname(os.path.abspath(__file__))
-# codepoint -> (glyph name, traced SVG). Keep codepoints at the very end of
-# the BMP private-use area (U+F8xx tail) to stay clear of the range Material
-# Symbols actually allocates.
+# codepoint -> (glyph name, traced SVG, content-box fractions). Keep
+# codepoints at the very end of the BMP private-use area (U+F8xx tail) to
+# stay clear of the range Material Symbols actually allocates.
+#
+# Material's own solid shapes draw inside 80..880 of a 960 upm em; a glyph
+# with fine outlines (like the OpenTimestamps stamp) reads much lighter at
+# the same bounds, so it gets a near-full-em box to appear the same size.
CUSTOM = {
- 0xF8F0: ("opentimestamps", os.path.join(HERE, "custom", "opentimestamps.svg")),
+ 0xF8F0: ("opentimestamps", os.path.join(HERE, "custom", "opentimestamps.svg"), 20 / 960, 940 / 960),
}
-# Fit content into the same square Material Symbols draw in (its check_circle
-# glyph spans 80..880 in a 960 upm font). Scaled to the font's real upm.
-BOX_MIN_FRAC = 80 / 960
-BOX_MAX_FRAC = 880 / 960
-
def svg_path_data(svg_file):
with open(svg_file, "r", encoding="utf-8") as f:
@@ -54,15 +53,15 @@ def draw_svg(paths, pen):
parse_path(d, pen)
-def build_glyph(paths, upm):
+def build_glyph(paths, upm, box_min_frac, box_max_frac):
# First pass: raw outline bounds.
bounds = BoundsPen(None)
draw_svg(paths, bounds)
x_min, y_min, x_max, y_max = bounds.bounds
- # Uniform scale into the Material content box, centered on both axes.
- box_min = BOX_MIN_FRAC * upm
- box_max = BOX_MAX_FRAC * upm
+ # Uniform scale into the content box, centered on both axes.
+ box_min = box_min_frac * upm
+ box_max = box_max_frac * upm
box = box_max - box_min
scale = box / max(x_max - x_min, y_max - y_min)
tx = box_min + (box - (x_max - x_min) * scale) / 2 - x_min * scale
@@ -79,8 +78,8 @@ def main(font_path):
upm = font["head"].unitsPerEm
order = font.getGlyphOrder()
- for codepoint, (name, svg_file) in sorted(CUSTOM.items()):
- glyph = build_glyph(svg_path_data(svg_file), upm)
+ for codepoint, (name, svg_file, box_min_frac, box_max_frac) in sorted(CUSTOM.items()):
+ glyph = build_glyph(svg_path_data(svg_file), upm, box_min_frac, box_max_frac)
if name not in order:
order.append(name)