| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <style> |
| /* Needs font specifications that do not trigger fallback differences |
| between base and synthetic small-caps (i.e. upper cased) versions. */ |
| span { |
| font-family: DejaVu Sans, Arial Unicode MS, Arial; |
| } |
| |
| .caps { font-variant-caps: all-small-caps; font-size: 50px; } |
| |
| .synthetic { |
| font-size: 35px; // 0.7 * caps font size, see SimpleFontData.cpp |
| } |
| </style> |
| |
| <!-- Concatenated list of all non context-sensitive regular-uppercase pairings from ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt --> |
| <span id="allsmallcaps" class="caps">ßİfffiflffifflſtstևﬓﬔﬕﬖﬗʼnΐΰǰẖẗẘẙẚὐὒὔὖᾶῆῒΐῖῗῢΰῤῦῧῶᾀᾁᾂᾃᾄᾅᾆᾇᾈᾉᾊᾋᾌᾍᾎᾏᾐᾑᾒᾓᾔᾕᾖᾗᾘᾙᾚᾛᾜᾝᾞᾟᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯᾳᾼῃῌῳῼᾲᾴῂῄῲῴᾷῇῷ</span> |
| <span id="uppercase" class="synthetic">SSİFFFIFLFFIFFLSTSTԵՒՄՆՄԵՄԻՎՆՄԽʼNΪ́Ϋ́J̌H̱T̈W̊Y̊AʾΥ̓Υ̓̀Υ̓́Υ̓͂Α͂Η͂Ϊ̀Ϊ́Ι͂Ϊ͂Ϋ̀Ϋ́Ρ̓Υ͂Ϋ͂Ω͂ἈΙἉΙἊΙἋΙἌΙἍΙἎΙἏΙἈΙἉΙἊΙἋΙἌΙἍΙἎΙἏΙἨΙἩΙἪΙἫΙἬΙἭΙἮΙἯΙἨΙἩΙἪΙἫΙἬΙἭΙἮΙἯΙὨΙὩΙὪΙὫΙὬΙὭΙὮΙὯΙὨΙὩΙὪΙὫΙὬΙὭΙὮΙὯΙΑΙΑΙΗΙΗΙΩΙΩΙᾺΙΆΙῊΙΉΙῺΙΏΙΑ͂ΙΗ͂ΙΩ͂Ι</span> |
| |
| <span id="sharpstruncation" class="caps">ßa</span> |
| <span id="sharpsuppercase" class="synthetic">SSA</span> |
| |
| <script> |
| test(function(){ |
| assert_equals(allsmallcaps.getBoundingClientRect().width, |
| uppercase.getBoundingClientRect().width); |
| }, "Synthetic small caps should produce the same width as manually uppercased, downscaled text."); |
| |
| |
| test(function(){ |
| assert_equals(sharpstruncation.getBoundingClientRect().width, |
| sharpsuppercase.getBoundingClientRect().width); |
| }, "Strings containing uppercased sharp S should not be truncated."); |
| </script> |