What is the "up-pointing" version of U+25BE? - unicode

I'm not even sure if it exists but I'm using this Unicode character as a down indicator http://www.charbase.com/25be-unicode-black-down-pointing-small-triangle (▾) but I need the "up" version...any ideas?

U+25B4 (▴) is technically the up-pointing version of (▾), but it's not exactly the same.
I was using it for showing whether a dropdown element was open and needed it to be exact. So I ended up using CSS transform to flip it. (In my case it was a pseudo-element).
.dropdown::after {
content: '\25BE';
}
.dropdown.active::after {
transform: rotate(180deg);
}

For this character, http://www.unicode.org/charts/PDF/U25A0.pdf contains U+25BE (▾) and related characters.
Looking at the PDF shows U+25B4 (▴) as the black small up-pointing triangle (formally BLACK UP-POINTING SMALL TRIANGLE).
In general, go to http://www.unicode.org/charts and enter the hex number for a character (e.g. 25B4) and it will show you which PDF file describes the related characters. View the PDF; in this case, a quick scan upwards from the down-pointing arrow found the related character code, and the next page shows the formal name and related details.

Do you want U+25B4 BLACK UP-POINTING SMALL TRIANGLE (▴)?
If you know the codepoint of a character and you're trying to find similar ones, try searching the code charts by hex code.

U+25B4 = BLACK UP-POINTING SMALL TRIANGLE. Isn't there a character map you can use installed on your system? I have one (gucharmap - the GNOME [Unicode] Character Map) specifically for occasions like this. Just a suggestion. :-)

Related

Display larger indentation for files that are indented with just two spaces

I'm working on a project that is using 2 spaces as indentation.
I have a hard time reading code with such small indentation, so my question is:
Question: Can I make vscode show the two spaces as if they were wider (for example double the width)?
(I could of course solve it in a hackish way, by converting each file on checkout, and convert it back before i commit it, but that would be very tedious and error prone. I could also try to convince the project to convert the whole project to tabs, so that everyone can use their own preferred indentation. But I don't want to go into that discussion for every project I work on :) )
I have written the extension Indent Whitespace that decorates each space used in indentation with additional spaces (cursor will skip the decoration).
The decorated spaces are colored with a very transparent red.
With a setting you can change the number of spaces to add, default 1.
If you delete spaces with Delete it looks funny because the selection does not change, use the Arrow keys to update the decorations.
In a later version I will make the decoration color a setting, and also only update the decoration when the file changes (only important for large files, and fix the delete-update rendering).
I think you can't.
There is no such setting in VS Code. As of version 1.13, you can change the kerning, but this changes the spacing between all characters. You cannot do this only for a single character (or a set of characters).
The space width is a property of the font. Microsoft has a guideline that defines what is the ideal space size for a font. But this does not mean you cannot change it yourself when designing one. So I created a version of Roboto Mono which space character is 4x the original one.
This works on Notepad and MS Word, we can see the space is quite big. However, using the exact same font in VS Code, the space is still small, independently of the font being monospaced or not.
Illustration
Somehow, it looks like VS Code ignores space size in the font and decides by itself what is the best value.

How to add a small straight line (I mean like this: a̅ b̅ X̅) onto a character inside a string?

I want to add small straight line onto some desired characters/numbers inside a string inside textview. I couldn't find a solution. Maybe using NSMutableAttributedString. Meanwhile, I mean doing this programmatically. There is strikethrough style, but not overstrike style. Or maybe adding the letters "a" and "_" with different .baseline values. But how to add both characters onto each other then?
Is it possible?
EDIT: Due to make a try for the helpful answers below, I think to make the line at a spesific height is needed. "A\u{0305}" makes the up line very close to the character, as if it sticks. Is there a way to make it at specific height? For example, if we assume that all the keyboard-inputted characters are written inside every single boxes, the ceiling side of these boxes could be lined?
So this (note: see edit below) appears to be an "a tilde ogonek" (it's Lithuanian).
You can write it for instance as follows using these two Unicode characters:
let atildeogonek = "\u{0105}\u{0303}"
let title = "How to add a small straight line (I mean like this: \(atildeogonek)) onto a character inside a string?"
The first character is the a with an ogonek, the second one is the tilde.
EDIT: The initial question specifically asked about the character ą̃ ("a tilde ogonek") in the title, and I used this code to demonstrate how to use Unicode characters in a Swift string. After posting this answer, the question was edited to be more general about "a line above a character".
Programmatically, you could use a function like this:
func overline(character: Character) -> Character? {
return "\(character)\u{0305}".first
}
That will take a character as input and return a new character (glyph) that has had the Unicode combining overline character added to it. It will return nil if adding the combining overline character fails.
The code print(overline(character:"A")!), for example, returns "A̅"
Or, if you want to add an overline to every character in a string, you could use a function like this:
func overline(characters: String) -> [Character?] {
return Array(characters).map { return "\($0)\u{0305}".first
}
}
(I'm not sure if there are any characters for which the above will fail, so I'm not sure if force-unwrapping the result is safe. Thus I left the result of both functions to be optional Character/Array of Character.)
You can easily find the unicodes of ā or ą̃ by using the xcode's own Character Viewer. Just follow the following steps :
hit : Control + Command + SpaceBar
If you get a compact one like this, click the upper right corner icon to expand it.
When expanded, Click the settings gear in the corner . Select customize list.
select Enclosed Characters
Go down to the bottom and open Code tables then add Unicode.
Now, just search for your required Character and you can check its unicode value. here i am searching ā
to print unicode's value :
print("\u{0101}")

How to display and write all distinct white space and control characters in VS Code (or other text editor)

I would like to be able to see all whitespace and control character explicitly in my text editor. Example Hi world! This is a new line! (pretend the new line is actually on a new line) as something like Hi\sworld!\nThis\sis\sa\snew\sline!.
Or another example: Some people like spaces while others... like tabs (pretend there is a tab after the three periods) would render as \s\sSome\speople\slike\sspaces\swhile\sothers...\tlike\tabs How can I go about doing this? Also is there a way I can explicitly enter control characters, perhaps using their Unicode value?
I'm sure some of you will want to know why I care to do this. Hacker types would find inherent appeal but, beyond the joy of knowing, an esoteric programing language like Whitespace would be much easier to write for in VS Code if this kind of explicit control were allowed.
So. Can it be done? Are the worlds great text editors powerful and flexible enough to allow for this kind of functionality?
In CudaText (free, cross platform) I can config this. I have tweaked few options (in user.json) with names unprinted_*, here is user.json for new app install:
{
"unprinted_show": true,
"unprinted_content": "sed",
"unprinted_tab_len": 0,
"unprinted_space_dot_scale": 40,
"unprinted_tab_ptr_scale": 40,
}
This makes space-chars - big dots (40%) and tab-chars - big arrows (40% pointer size). Here's screenshot
I tested CudaText with all white space chars from Wikipedia list https://en.wikipedia.org/wiki/Whitespace_character#Unicode . Most are shown by one way or another, high unicode chars (0x2000+) not shown:
line ends 0x0A or 0x0D: shown as marker "un" or "mac" or "win" at line ends
tab char 0x09: shown as arrow with pale color
space char 0x20: shown as dot with pale color
char 0x0B, 0x0C: shown as "x0B", "x0C" with pale color
char 0x85: shown as font glyph
char 0xA0: shown as pale dot, like space
char 0x1680: shown as font glyph
chars 0x2000...0x200A: shown in hex form like "x200A"

How can I use the original unicode characters for the four card suits in a jupyter notebook?

If I copy and paste the four symbols from the character selection panel (I'm on macOS) they change to the following: ♠️ ♣️ ♥️ ♦️, whereas I'd like the heart and diamond to be red.
EDIT: Interestingly, i've noticed that if I type the sequence 👁‍🗨♥️, and then I hit backspace when the cursor is between those two characters, they both transform into 👁‍♥️! (the same happens with the other three)
Can someone explain what is happening?
I guess this is because your browser doesn't know about these special characters. But I think you can check this page https://www.w3schools.com/charsets/ref_utf_symbols.asp
and replace special characters with unicode codes from page
or from this page http://graphemica.com/%E2%9D%A4

Microsoft Word: is anchor character or not?

I am trying to simulate Word's displaying of non-printing characters. There is no problem with all of them but anchors and I didn't found any info related to them. Is anchor special character placed in text or is it parameter of floating object and just displayed as special character?
Thank you for answer
The anchor, unlike most non-printing characters, can never print. It's merely a visual aid to inform the user with which paragraph or character a graphic with text flow formatting is associated. It's not possible to detect an anchor directly in the document text using Word's API (object model). It's bound to the graphic and would require analyzing the properties of the Shape object.
It could be determined by analyzing the document's WordOpenXML, although the term "anchor" is not used. The information could be deduced from the location and settings of the nodes that define where and how the graphic appears.
Is anchor special character placed in text or is it parameter of floating object and just displayed as special character?
I'm going to try to answer the "is it in text" question.
If, while debugging, you try to get a textual character for an anchor from a range's text, it won't be there. There won't even be a 0-width non-visible character there, like when you move a text cursor to the right past a non-printable character, but it doesn't actually move because there's something there (this may be editor-dependent, I have Notepad++ in mind).
So no, it's not in text.
But, at the same time, it will interfere with searches. E.g. If you put the word "text" on a line, put a text box on that line to create an anchor, and then search for "^13text" (with wildcards enabled, ^13 means the end-of-paragraph mark), it won't find it.
So yes, it must be in text because it interferes with searches.
So this might be a contradiction, but let's keep going. If it's in text, where is it? If you place the text cursor on the previous line, hold shift, and move it once to the right, the text box will be highlighted.
So it must be at the start.
But, there is also evidence that contradicts this. If you have a field at the start of the line with text on it, you can move it once to the right as before, and then once to the left, and though you have part of the line highlighted, the text box won't be part of the selection.
So, I really have no idea whether it's text or not, or where it is if so, but hopefully this helps someone else.