16

Whats the unicode Character code of that f symbol? (Image by WHATWG). I suppose it's the tallest Unicode character there is. Is it?

bounding box illustration

Community
  • 1
  • 1
axkibe
  • 2,577
  • 4
  • 18
  • 13
  • I'm curious why you need to the tallest character. – some Feb 09 '12 at 09:56
  • Just a large one, for testing on drawing on canvas, looking if the canvas is large enough. I don't want to segregate non-latins which often seem to be quite taller than most latin symbols (in most default fonts) – axkibe Feb 09 '12 at 10:03
  • 2
    Wouldn't it be better to check the height of the actual text you want to put in the canvas? http://stackoverflow.com/a/7462767/36866 – some Feb 09 '12 at 10:16
  • some. That code tests the size of the 'M' and IMHO is thus an example of doing it wrong :-) – axkibe Feb 09 '12 at 10:22
  • Unfortunally Javscript gives us now a possibility to meassure font width, but non to meassure the height, especially regarding the baseline of the used font. You can draw text positioning Y by the baselie, but there is no reliable way to know exactly how large the bounding box is. Thats why I rely on rules of thumb. At least baseline to top of box seems to be exactly the size in pixels as the fontsize suggests. At least in the default webfonts I test with. – axkibe Feb 09 '12 at 10:26
  • What if you replace the constant string in `document.createTextNode("M")` with a variable with the content of the text you want the height from? I haven't tested it so I have no idea if it works. – some Feb 09 '12 at 10:39
  • 3
    That looks like the *f* in Zapfino. Besides being ultra-swash, and having zillions of fancy variants, everything in Zapfino is oversized for the point size selected, too. For a good time, render "Zapfino" in Zapfino while default ligatures are enabled. – tchrist Feb 09 '12 at 11:09
  • some, I would need the size of every possible text (its user changeable), so it would have to include all characters there is. – axkibe Feb 09 '12 at 11:13
  • tchrist great answer! I'll just install Zapfino on my system for testing :-) – axkibe Feb 09 '12 at 11:14
  • The point I'm trying to make is that it looks like you can determinate the height of the users text at run-time with the selected font, instead of trying to solve it for every font when writing the code. – some Feb 09 '12 at 11:40
  • some. yes, but I need to know the size of the text, before it is possibly changed. – axkibe Feb 09 '12 at 13:11
  • This question appears to be off-topic because it is about fonts and not programming. – animuson Apr 12 '14 at 18:25
  • well as you can see in the comments its about how high a canvas buffer in javascript should be allocated so it fits a font. its been answered already as not answerable. moderate away if you feel you must do. – axkibe Apr 13 '14 at 18:40
  • this one is the tallest I see so far ⎛⎝≥⏝⏝≤⎠⎞ – wei Dec 23 '20 at 11:36

3 Answers3

91

The tallest Unicode character in the current standard (Unicode 6.1) is , U+1F5FB MOUNT FUJI, which is 3776 meters tall.

Mechanical snail
  • 28,373
  • 14
  • 86
  • 111
31

The height of a character has nothing to do with Unicode (or any of its transformations, such as UTF-8). The height of a character is defined by the font used to render it. Although obviously various fonts will adhere to convention (mostly), that doesn't mean that the tallest character in one font will necessarily be the tallest in another.

T.J. Crowder
  • 959,406
  • 173
  • 1,780
  • 1,769
  • okidoky, thats logical, so whats a very tall character by convention? And whats that code of the f from WHATWG? – axkibe Feb 09 '12 at 09:51
  • @axkibe: Doesn't the WHATWG page on which you found that graphic tell you what entities it used? – T.J. Crowder Feb 09 '12 at 09:54
  • What do you mean with "convention"? Many *Script* fonts render upper-case letters several times taller than their lower-case equivalents. They're pretty tall for my taste. – Álvaro González Feb 09 '12 at 09:56
  • By convention I mean the majority of fonts. I just need a good character for testing. Using latin symbols with normal browser fonts none goes below or above the em square. I just found to be a good candidate that seems to use hte bounding box in its fullest in most fonts. – axkibe Feb 09 '12 at 10:02
  • @ÁlvaroG.Vicario: I mean the general convention of the script being rendered. E.g., a font won't render "f" as "~". Convention is required for people to be able to read it (though I've seen some fonts that were pretty darned hard to read). :-) – T.J. Crowder Feb 09 '12 at 10:14
  • I now use Ḕ and for my testing purposes. "by convention" the former goes to the very top of the bounding box and second to the bottom. Not as nice as that super-f from WHATWG, but it server my purpsoe. THank you all :-) – axkibe Feb 09 '12 at 10:15
  • @axkibe Try some of the Emoji. – tchrist Feb 09 '12 at 11:11
  • Just got the case in point. simple f in Zapfino is much larger than Ḕ (which does not exist on symbol on my apple, only on my linux). Zapfino also violates my other assumtion that baseline to top of bounding is font size in pixels, this holds true only for "normal" fonts it seems. – axkibe Feb 09 '12 at 13:21
  • So then explain how [this answer](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags) was put together. For instance, things like S̨̥̫͎̭ͯ̿̔̀ͅ seem to be one unicode "character", but I'll be damned if I can work out which one, or if it is actually supposed to render across multiple lines like that (it does in Chrome at least), or where I can find a list of other unicode characters that render across multiple lines of text. – aroth Apr 24 '12 at 03:18
  • 2
    @aroth: That's not a single Unicode character, it's the letter S plus 10 [combining characters](http://unicode.org/faq/char_combmark.html), including several that need to go under the S. Apparently when you have multiple combining characters that have to go under, they stack up (or rather, down). I threw this together to let you decode these sorts of sequences: http://jsbin.com/erajer Just copy and paste whatever sequence you want, and it will show you what it's composed of, with links to the Unicode Character Properties utility for each character. Only works for characters < U+FFFF. – T.J. Crowder Apr 24 '12 at 07:45
1

Maybe it's an oversized ƒ

javascript: "ƒ".charCodeAt(0) gives 402

function symbol but its apperance really depends on used font

T.J. Crowder
  • 959,406
  • 173
  • 1,780
  • 1,769
rezoner
  • 1,843
  • 13
  • 16