Sorry if this isn't the right overflow for this question. I need a unicode character that is as long as ⎢ (23A2, LEFT SQUARE BRACKET EXTENSION) but lines up horizontally with ⎮ (23AE, INTEGRAL EXTENSION). Is there such a character?
Take a look at shapecatcher. If you draw a straight line, it shows plenty of different codepoints resembling |.
As already pointed out, exact placement and size may depend on the font, but if you know that the font is going to be a specific one (because you supply it), you could still find the character you're looking for.
It turns out this does depend on the font. If I use DejaVu Sans Mono, INTEGRAL EXTENSION is as long as I want it to be. This font appears to be almost exactly the same as the font I was using, Menlo, except for some small differences with some characters (including this one).
Related
I want to use the → character with two // strokes through the arrow but cannot find the unicode value for it anywhere. Does this exist in unicode? If not, is there a way to recreate it?
There are six Unicode characters whose name matches a right arrow with a double stroke, making use of the regular expression: /right.*arrow.*double.*stroke/.
Only two characters appear to be relevant candidates:
⇻ U+21FB RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE
⭼ U+2B7C RIGHTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE
(* RIGHTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE VERTICAL STROKE)
Notes:
The official Unicode name of U+2B7C was initially wrong, but a corrected name has been added later as an alias.
U+2B7C appears to be quite uncommon, no suitable font was available in the OS used for the screenshot. Still, it is possible to see what it should look like in the Miscellaneous Symbols and Arrows - Range: 2B00–2BFF PDF document:
I was not successful in finding what you were looking for (negative result). U+0219B is a "Rightwards Arrow with Stroke" and U+021FB "Rightwards Arrow with Double Vertical Stroke". If it exist, it would probably be called "Rightwards Arrow with Double Stroke". https://en.wikipedia.org/wiki/Arrow_(symbol)
The following Unicode sequences should describe your character, but unfortunately fonts are not helping.
→⃫ : \u2192\u20EB
⟶⃫ : \u27F6\u20EB
They are normal and long arrow, with the combining U+20EB: COMBINING LONG DOUBLE SOLIDUS OVERLAY (long double slash overlay). You may find a technical font which can display both in the expected way.
You may get something acceptable also with:
⎯⎯⎯⃫⟶ \u23AF\u23AF\u23AF\u20EB\u27F6 (using arrow extension line)
⎯⎯⃫⟶ \u23AF\u23AF\u20EB\u27F6
Depending on the environment, one of the two seem much better (on my computers).
So: you can express it (semantically) with Unicode, but standards fonts are not helping us. You should experiment with many symbols/mathematical fonts, to get an acceptable solution.
As alternative, you can build such image easily with SVG (and use a SVG as character image).
When a textbox, browser or other program can't display a character, or the character is not valid unicode, a white-box character is drawn instead to represent the missing glyph.
I assume that this box-glyph is a Unicode character itself, thus I am looking for its codepoint so I can use it. Does anyone know which codepoint is used, or perhaps if my assumption is wrong and it is not necessarily a member of the font?
At first I thought it might be the White Square (U+25A1), but, after I compared this glyph with an example, I found white square was smaller. There is a larger variant of it (medium and large), but these do not appear in the font under consideration, so these can not be the ones I am seeing.
I managed to find my answer, here on stackoverflow: https://stackoverflow.com/a/22636426/2718186
Particularly, the part that talks about .notdef glyph. It seems that fonts reserve a special glyph, that is not mapped to by any Unicode point, to indicate that a character has no glyph in the current font.
I am trying to minimize the vertical distance between controls on a programmatically constructed Windows Form (using C#). This involves setting the Height property appropriately.
I have found that if the text of the control does not contain any letters with descenders in them (i.e. does not have any of the characters j, g, p, q or y) then the control Height can be smaller than when it does contain such letters (if it does contain letters with descenders then the descenders are chopped off if the Height isn't enough).
It will work fine to test for any of the above 5 characters as long as the language is English, or English - like, but I need to be able to cater for (just about) any language.
Is there a way, given some arbitrary Unicode character (and perhaps a font) to determine if that Unicode character has a descender or not?
There is no property defined for Unicode characters to indicate the presence of a descender, and it’s really a feature of glyph design rather than characters. For example, “Q” has a descenders in many fonts, and “J” has one in some. Besides, given the context, you should also consider diacritic marks placed below a letter, not just descenders of base letters. And probably diacritics above letters, too.
So you would need to read the font information (when available) about character dimensions, or tentatively draw characters in your software and measure their dimensions.
As a rule of thumb, any line height below 1.1 times the font size will cause problems with some characters and fonts. Using 1 (“setting solid”) is not enough, because characters may in fact extend outside the font size.
In Windows, you call GetPath() to get an array containing the X/Y coordinates of every point making up the perimeter or outline of the string of glyphs. Search the array for min/max, which will get you the rectangle exactly enclosing the string. Right to the edge of the letters.
I am not certain whether this is the right place to ask this, but I do not know of any other sites that would fit better. And the question has something to do with programming, so:
I Am Writing a formatted txt-guide. Please take a look at this excerpt: http://mad-gaksha.homelinux.net/public/width.txt. I need to have full-width characters displayed so that they occupy exactly twice the space as half-width characters. While monospaced fonts seems to work fine with only half-width chars, most fullwidth "fixed-width" fonts I've tried didn't produce the desired result.
In firefox, this works when I set the monospace font (Edit>Preferences>Content>Advanced)to "monospace". But only for a font-size of 14. Same thing with gedit, the fixed-width font MS-Gothic, works only for font sizes 13/14.
As I find this behaviour quite strange and wouldn't want my readers to be troubled by technical details, does anyone have suggestions or give any resources or could explain what's going on here? Why does it seem so hard just to display each glyph with a fixed size?
Thanks in advance for taking your time.
It looks like it's to do with rounding fractional pixels.
A font renderer may adjust horizontal positioning when the width of a glyph isn't a whole number of screen pixels. I believe the Cairo rendering used by gedit and Firefox on Linux doesn't do sub-pixel positioning for fonts so this may be necessary here.
In a true monospace font this doesn't matter because every glyph has the same width so receives the same treatment, but where there is a mixture of full- and half-width characters, the rounding won't be uniform unless the glyphs happen to be a whole number of pixels wide (which happens in your case at font size 14).
Note that on Windows for most small sizes, fonts like MS Gothic will be rendered using custom built-in bitmaps in the font file, instead of rendering the outlines and their metrics. This makes all glyphs necessarily a fixed number of pixels wide. However this does result in the typical old-school ‘jaggy’ rendering style.
If you are producing formatted-text files there is really nothing you can do about this. You can only hope that your target audience has Japanese monospaced fonts that are suitable and can switch to them at a particular font size.
I would agree with Clement's comment that using HTML to get the rendering you want would be more robust, modern and convenient. Using HTML for layout relieves you of having to worry about lining up characters, and allows you to get fonts that are less ugly than all that half-width-monospaced Latin.
I'm looking for a font which contains a graphic character which is (essentially), the space character, inverted. I'm looking for a graphic character equivalent to the largest-possible solid-black box. The closest I have been able to find is Wingings 2 character 162, but that doesn't fill the entire available character space. When I insert two consecutive Wingdings 2 162 characters, there is still appreciable whitespace between them when displayed or printed. Does anyone know of a black-box font/character which would fill all available character space?
All characters are going to have whitespace between them, or they would be unreadable. This is called "kerning". You can adjust the kerning and line-height in whatever program you are using to send the malicious fax, if you want to be sure to use the maximum amount of toner per page.
Have you considered creating your own font using a software package like this or like this? You could edit the space character to be a solid black square. But as Chris McCall mentioned, you may still have space between characters of any size due to kerning applied by the layout engine that draws the fonts.
You other option is to owner draw your own text and programmatically replacing spaces with black boxes. You would have complete control over kerning and everything else.
I don't know if this is exactly what you were looking for, but...
I was looking for the same thing, since I wanted to create a "textbox" when I wanted to write text using the spritefont, but I never knew how long the total string was going to be, so I wanted something that I could "write" in the same location right before the string with a contrasting color which could be expected to be as long as the string it needed to encompass. That being the case, try:
Webdings - character 103.
I tried lining them up and there wasn't even any space in between. Perfect.