Skip to content

fonts.google.com - Show Cap- and Ex- Heights by myfonj

Screenshot of fonts.google.com - Show Cap- and Ex- Heights

Details

Authormyfonj

LicenseCC0

Categoryfonts.google

Created

Updated

Size901 B

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Simple utility that might help reveal potental problems with font metrics.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           fonts.google.com - Show Cap- and Ex- Heights
@namespace      github.com/openstyles/stylus
@version        2.1.0
@description    Simple utility that might help reveal potental problems with font metrics.
@author         myf
==/UserStyle== */

@-moz-document domain("fonts.google.com") {
/*
Chengelog
2.1.0 (2024-10-08) Now applied to variant listing as well.
*/
 .variant__font-render div,
 .tile__text {
  --ex: color-mix(in srgb, highlight 40%, transparent);
  --ascend: color-mix(in srgb, mark  30%, transparent);
  line-height: 1cap !important;
  background-image: linear-gradient(
   to top,
   var(--ex)   0 1ex,
   var(--ascend) 1ex 1cap,
   red       1cap
  ) !important;
  /*
  none of these is really necessary:
  */
  background-size: 100% 1cap !important;
  background-position: left bottom !important;
  background-repeat: no-repeat !important;
 }
 /* */
}

Reviews

No reviews yet.