Jump to content

Wikipedia:Reference desk/Archives/Computing/2024 May 21

From Wikipedia, the free encyclopedia
Computing desk
< May 20 << Apr | May | Jun >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 21[edit]

I've been trying to do strikethrough with Unicode. I'm finding that the composed characters are to the right of where they "should" be, and somewhat too low, see the examples on our article, and in the combining character article, these are not in the correct position to be a traditional strikethrough. In fact the tools I've used work best if the struck through text is preceded with a "space strikethrough" (and no strikethrough at the end?). Is there a better solution in Unicode? All the best: Rich Farmbrough 21:00, 21 May 2024 (UTC).[reply]

Implementations of combining characters tend to be plagued by bugs. The precise appearance, including positioning and kerning, is not regulated by Unicode but by the rendering engine of the browser, using its font tables for the specific font. Here are examples of plain and struck-through vertical bars in a few typefaces, using U+0335.
Times New Roman:
||||||||||
|̵|̵|̵|̵|̵|̵|̵|̵|̵|̵
Courier:
||||||||||
|̵|̵|̵|̵|̵|̵|̵|̵|̵|̵
Courier New:
||||||||||
|̵|̵|̵|̵|̵|̵|̵|̵|̵|̵
Comic Sans MS:
||||||||||
|̵|̵|̵|̵|̵|̵|̵|̵|̵|̵
For me, using Firefox on macOS, the effects are quite varied across these fonts. Using Safari, the effects are also varied, but markedly different. The widths of ⟨|⟩ and ⟨⟩ differ for each typeface on Safari. The struck-through bars are narrower for Comic Sans MS. Not only are they 226% (!) wider than the vanilla bars in Times New Roman, but they are even 33% taller, which I find quite bizarre.  --Lambiam 10:40, 22 May 2024 (UTC)[reply]