Gnuplot Unicode characters - unicode

If the Unicode codepoint for a full moon is U+1F315, how do I use that in a plot?
Using #andyras example:
set terminal epslatex standalone color
set output 'plot.tex'
set xlabel '$\odot$ is a \LaTeX symbol.'
plot sin(x)
(here on SO gnuplot - pdf terminal - setting unicode character (solar mass symbol/odot))
How would I insert that Unicode character? Preferred output is PDF and I have pdfcairo installed.
UPDATE: #darthbith #Christoph
Turns out the Symbola font includes all unicode glyphs for basic moon phases.
In these labels, the last 2 work. Inserted as symbols into the BBedit command file, the symbols appear correctly; BBedit file is saved as UTF8; UTF8 is set in the terminal. The SVG terminal output displays all the characters properly; the Aqua abd PDF terminals display only the First and Last Quarters properly:
"" u (myDateSP(1,2)):3:((strcol(4) eq "New") ? ("๐ŸŒ‘"):1/0) w labels left font "Symbola,28" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "Full") ? ("๐ŸŒ•"):1/0) w labels left font "Symbola,28" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "First") ? ("โ˜ฝ"):1/0) w labels left font "Symbola,28" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "Last") ? ("โ˜พ"):1/0) w labels left font "Symbola,28" offset -4,0,\
Neither of these terminal setups seems to help:
set terminal pdfcairo enhanced size 13.5,9.8
set term pdfcairo enhanced font "Symbola" size 13.5,9.8

Turns out the Symbola font includes all unicode glyphs for basic moon phases. In these labels, the last 2 work. Inserted as symbols into the BBedit command file, the symbols appear correctly; BBedit file is saved as UTF8; UTF8 is set in the terminal. The SVG terminal output displays all the characters properly; the Aqua and PDF terminals display only the First and Last Quarters properly.
The solution was to use the Symbola font and glyphs, and substitute its circle and large black circle for the full and new moon. The full/new moon codepoints are such recent additions that they rarely work in desktop applications (they do work in BBEdit, but not in PDFcairo terminal).
The thread with full details about all this is here:
https://groups.google.com/forum/#!topic/comp.graphics.apps.gnuplot/96gDfBo3gp8
And my labels now look like this and worked as I wwanted.
"" u (myDateSP(1,2)):3:((strcol(4) eq "New") ? ("โ—"):1/0) w labels left font "Symbola,68" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "Full") ? ("โ—ฏ"):1/0) w labels left font "Symbola,28" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "First") ? ("โ˜ฝ"):1/0) w labels left font "Symbola,40" offset -4,0,\
"" u (myDateSP(1,2)):3:((strcol(4) eq "Last") ? ("โ˜พ"):1/0) w labels left font "Symbola,40" offset -4,0,\

Related

Characters in FontForge appear distorted

I'm trying to create a font using FontForge which is 'simply' the alphanumeric characters from Lato (original version) as well as the greek alphabet characters from Lato (extended version). I opened both fonts in FontForge and copied and pasted the greek letters over to the original version. I generated the font and displayed it in Google Chrome. But the characters that I've copied come out jagged / distorted. I've also tried opening the original font, then going to element and then merge fonts and selecting the extended version font and then generating a font from that but the same problem occurs.
The screenshot provided below shows the distortion going on. The top line shows how the letters should look. The bottom line shows how the letters actually look. Many of the letters - even the ones that were in the original (such as the 'a') - aren't displaying properly. The bottom and top of some characters has been flattened and for other characters, extended. Notice the top of the alpha, rho and epsilon are pointed and aren't smooth as they should be. The top of the beta has been flattened. Look at the top and bottom of the 'o' - both have been flattened as if to fit into a minimum allowable area.
If I zoom in a lot, the jagged edges become smooth again.
What can I do to fix this?

Why is my 80 character ruler between Sublime Text3 and VS Code so different?

I have my ruler settings in Sublime Text 3 and VS Code at 80. In my sublime image I separate my functions using "#---#" which is as wide as the 80 character ruler. When I open the same file in VS code the ruler is nowhere near the 80 character limit, its somewhere in the hundreds. Does anybody know what's going on?
Below is a screenshot from Sublime Text 3
Below is a screenshot from VS Code:
Notice the different placement of the 80 character ruler.
It looks as though you're not using the same font in both cases, and in fact the font in Sublime is Fixed Width while the font in VSC is Proportional.
This is visible not only in the rulers, but in the code itself. For example, presuming it's the same file in both screen shots, the indent looks to be 4 characters in Sublime and 3 in VSC.
Both things are a symptom of a Proportional font; a font in which the width of each character is potentially distinct, unlike a Fixed Width font in which every character is the same width.
In a Fixed Width font, an X and a dash are the same width (for example), but in a Proportional font a dash is usually narrower (and a space much more so). As a result the ruler being at character position 80 doesn't line up with the actual character at position 80 because the text isn't long enough.

How to display multi character unicode emojis in Overleaf LaTex?

So apparently Overleaf now can render emojis using packages of Noto Color Emojis, where you can use {\NotoEmoji \symbol{"1F343} \symbol{"1F338} } to input an emoji with corresponding unicodes.
My question is how to input complex emojis that are composed of multiple emojis? For example, this one ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ, the unicode is U+1F469โ€ U+200D U+1F469โ€ U+200D U+1F466โ€ U+200D U+1F466.
I've tried combinations like
\symbol{"1F469โ€200d1f469200d...1f466}
\symbol{"1F469 200d 1f469 200d...1f466}
\symbol{"1F469} \symbol{"200d}...\symbol{"1f466}}
But none of them works.
You don't need to concatenate them. Here's the solution that I tried in Overleaf and it worked fine.
{\Large
\NotoEmoji
% family emoji
\symbol{"1F468}\symbol{"200D}\symbol{"1F469}\symbol{"200D}\symbol{"1F467}\symbol{"200D}\symbol{"1F466}
}
Expected Output
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Family: Man, Woman, Girl, Boy,
You can use the same trick for Emoji Skin Tone Modifiers in Overleaf where the modifier comes right after the emoji Unicode.
{\Large
\NotoEmoji
% Waving Hand emoji
\symbol{"1F44B}%
% Waving Hand: Light Skin Tone
\symbol{"1F44B}\symbol{"1F3FB}
}
Expected Output
๐Ÿ‘‹
๐Ÿ‘‹๐Ÿป
Here's the Overleaf Project page about Displaying Color Emojis in Latex that you can check out.
Updated 2020-11-28 : Adding emoji as an image in Latex
Since you mentioned adding emojis as images, I'm also including my solution for that.
\usepackage{tcolorbox}
% change font size here
\includegraphics[height=12]{family-man-woman-girl-boy.png}
The image can be downloaded from EmojiPedia.

How to darken postscript text produced by emacs

I'm using emacs command ps-spool-buffer-with-faces command to make some postscript files of code I'm working on. The problem is that the font color seems to be light gray instead of black. I've poked around the postscript file & googled a bit, but have not found any solution. Does anyone know how to turn my gray font black?
Assuming you just want to print in black and white, try:
(setq ps-print-color-p nil)
Otherwise, you might take a look at other values for ps-print-color-p:
ps-print-color-p is a variable defined in `ps-print.el'.
Its value is t
Documentation:
Specify how buffer's text color is printed.
Valid values are:
nil Do not print colors.
t Print colors.
black-white Print colors on black/white printer.
See also `ps-black-white-faces'.
Any other value is treated as t.
You can customize this variable.
You can customize using M-xcustomize-variableRETps-print-color-pRET

Vertical text alignment in Crystal Reports?

In the Crystal Reports editor that comes with Visual Studio (2008) is it possible to align text to the center of a text box rather than to the top?
I can't find the option anywhere and a Google search is not encouraging but I just can't bring myself to believe that they would not include such an obvious feature.
There is no vertical alignment for crystal reports that I could find. A potential work-around is programming line breaks.
I can't find an option to vertically align text within a label, but you can vertically align labels within a section. Use the horizontal guidelines on the left margin to adjust the alignment. You may need to right-click the guideline and un-check "Snap to Grid" to get more precise positioning.
You can achieve this with strings, as you will see a paragraph tab instead of a number tab when you enter the FORMAT FIELD menu. To make your number a string you should format it as a formula field thusly:
chr(13) + chr(10) + totext(mynumber,0)
Then in the FORMAT FIELD menu select - Line spacing: multiple of: 0.2
You may need to experiment with the 0.2 value until you find your number (i.e. string prefixed with a carriage return) nicely centered in the middle of your box.
Cheers,
Chilly
Vertical alignment with programming line breaks. Algorithm for the one cell:
Count the number of characters in data (iTextLen).
Find the number of text lines in cell (iLineNum). Calculated empirically.
Find the row length in characters (iLineLen). Calculated empirically.
Calculate count the number of halfbreaks by formula (iLineNum โ€” 1) โ€” (iTextLen / iLineLen).
#formula in crystal syntax:
Local NumberVar iLineNum:= 5;
Local NumberVar iLineLen:= 30;
Local NumberVar iTextLen:= Length({DataSource});
Local StringVar sRet:= '';
Local NumberVar i;
Local NumberVar iLinesNum:= Truncate(iLineNum - 1) - Truncate(iTextLen / iLineLen);
For i:= 1 to iLinesNum Do ( sRet:= sRet + chr(13) );
sRet
Add formula to the top and bottom of data. Text objects will look like this:{#formula}{DataSource}{#formula}
Font size of #formula must be halved of font size {DataSource}. For example, if the font size of {DataSource} equal to 20, the #formula should be equal to 10:
Algorithm works better with monospaced typeface, but with proportional typeface works in most cases.
Algorithm for multiple cells is differ only that iLineNum will be the maximum number of characters in data of all cells.
in crystal report 10 the label >> right click >> format Text >> Common >> text rotation . choose 90 degree the text will have a vertical alignment
same in a field or any object you add to the report
hope that i help you
note the answer (Format text > tab Paragraph, Horizontal alignment: Centered) is a wrong