Bug 248510 - The name of the fonts is displayed over the title, only with `font-variant: small-caps`and apostrophe + lowercase letter
Summary: The name of the fonts is displayed over the title, only with `font-variant: s...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://gameofthrones.fandom.com/wiki...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-11-29 18:03 PST by Karl Dubost
Modified: 2022-11-30 20:34 PST (History)
2 users (show)

See Also:


Attachments
simplified test case (964 bytes, text/html)
2022-11-29 18:03 PST, Karl Dubost
no flags Details
rendering in safari, firefox, chrome (774.36 KB, image/png)
2022-11-29 18:05 PST, Karl Dubost
no flags Details
samplified test case (716 bytes, text/html)
2022-11-29 19:27 PST, Karl Dubost
no flags Details
testing all ascii characters (1.16 KB, text/html)
2022-11-30 20:34 PST, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Dubost 2022-11-29 18:03:49 PST
Created attachment 463799 [details]
simplified test case

Previously opened on https://github.com/webcompat/web-bugs/issues/114873

Steps to reproduce.
1. Open the test case or go to https://gameofthrones.fandom.com/wiki/Jaqen_H%27ghar

Expected:
Title is "Jaqen H'ghar"

Actual:
Title is an overlap of "Jaqen H'ghar" and "Game of Thrones"


The funny thing is that this is happening only when `font-variant: small-caps` is active.
The CSS is 

```
     @font-face {
        font-family: "Game of Thrones";
        src: url(https://static.wikia.nocookie.net/gameofthrones/images/c/c0/Game_of_Thrones.woff2)
          format("woff2");
      }

      @font-face {
        font-family: "Trajan";
        src: url(https://static.wikia.nocookie.net/gameofthrones/images/b/b3/Trajan_Pro_Regular.woff2)
          format("woff2");
      }

      :root {
        --standard-font-family: "Game of Thrones", "Trajan";
        --theme-page-headings-font: "Game of Thrones", "Trajan";
      }

      h1 {
        font-family: var(--standard-font-family);
        font-variant: small-caps;
      }
```
Comment 1 Radar WebKit Bug Importer 2022-11-29 18:04:12 PST
<rdar://problem/102793416>
Comment 2 Karl Dubost 2022-11-29 18:05:54 PST
Created attachment 463800 [details]
rendering in safari, firefox, chrome
Comment 3 Karl Dubost 2022-11-29 18:19:41 PST
The bug can be reproduced in Safari 16.1
Comment 4 Karl Dubost 2022-11-29 19:27:52 PST
Created attachment 463801 [details]
samplified test case

The issue happens only with 

' + lowercase letter

hat tip: Cameron McCormack
Comment 5 Karl Dubost 2022-11-30 20:34:55 PST
Created attachment 463824 [details]
testing all ascii characters

This is happening for all prefix ASCII characters which are not a letter.