Require more `TH Sarabunit๙` font for Google docs, sheets - google-sheets

File - Language - ไทย has been set
But still just TH SarabunPSK doesn't fit our need enough, we want more TH Sarabunit๙ font.
Google fonts doesn't have TH SarabunPSK either but still be able to use, so I require for TH Sarabunit๙ font as well.
The font I require here will help us with Thai numbers such as autofill. The only TH SarabunPSK font isn't able to do that.
it directly changes the number display to Thai numbers.
We need either,
so if we want the number 0123456789 we use TH SarabunPSK.
if we want Thai numbers ๐๑๒๓๔๕๖๗๘๙ we just need to change the font to TH Sarabunit๙, all the other characters are the same.
When we type number we type 0123456789 not symbols like ๐๑๒๓๔๕๖๗๘๙ because the computer doesn't understand them as numbers.
I currently MANUALLY type the Thai number one by one, which is too much unnecessary work.

you can search fonts over:
https://fonts.google.com/?preview.text=%E0%B9%90%E0%B9%91%E0%B9%92%E0%B9%93%E0%B9%94%E0%B9%95%E0%B9%96%E0%B9%97%E0%B9%98%E0%B9%99%200123456789&preview.text_type=custom
and see the compatibility:
update
the easiest way:
=ARRAYFORMULA(
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1:A,
0, "๐"), 1, "๑"), 2, "๒"), 3, "๓"), 4, "๔"),
5, "๕"), 6, "๖"), 7, "๗"), 8, "๘"), 9, "๙"))

Related

jsPDF doesn't show certain letters properly (ū)

I am trying to create a PDF File to export using jsPDF library. In one of the lines I am trying to write a word that contains this 'ū' letter,
doc.text('Hūla', 20, 30);
However, when doing so the exported file doesn't contain this letter but instead it becomes
'H k l a' with spaces in between and a k instead of the ū.
What can I do in order to have this printed properly?
The solution was to use a font that supports this. I had to try multiple ones in order to get it working with this letter ū (it is not a specific language)
The font was Amiri. It also supported the Arabic font.

How to extract number from text in Google Sheets

My product names contain different sizes: e.g. 100ml, 50ml, 30ml.
Sample product name:
Babaria Aloe Vera Shaving Gel Sensitive Skin 200ml
From this I try extract capacity: 200ml.
To make it easier to do this, I am sharing a document.
https://drive.google.com/file/d/1gPuNiNwvK1bG5WxD-4kFgrYjSF72SkwX/view?usp=sharing
Could somebody help me and give me some example?
If it's hard to extract numbers with "ml", it also might be helpful for me to extract only numbers.
You can use:
=INDEX(IF(A2:A="","",REGEXEXTRACT(A2:A,"\b\d+ml\b")))
Where \b\d+ml\b means:
\b - A word-boundary to assert position has no leading word-characters.
\d+ml - 1+ Digits followed by literally "ml".
\b - A word-boundary to assert position has no trailing word-characters.
If you just want the numbers without "ml" then try to change the pattern to \b(\d+)ml\b where the only difference is the use of a capture group which will be the result of the REGEXEXTRACT() function here.

Lithuanian noun translation in conjunction with numerals in iOS

An important question came up when I tried to translate an existing iOS application into Lithuanian. I know how the Apple translation system works, especially for languages like English or Hungarian. But how I have to translate Lithuanian nouns in combination with numerals I don’t know.
The Lithuanian grammar in conjunction with numerals works like this for the word "įvykis" (event):
Lithuanian English
0 įvykių 0 events
1 įvykis 1 event
2 - 9 įvykiai 2 - 9 events
10 - 20 įvykių 10 - 20 events
21 įvykis 21 events
22 -29 įvykiai 22 - 29 events
30 įvykių 30 events
the same logic continuous
as of 21
More information about Lithuanian noun declension by numerals can be found in this Wikipedia article.
My question is, what key values have to be filled into the "Localizable.stringsdict" for Lithuanian? For English this file looks like this:
and for Lithuanian the same file looks this:
Those entries in the last table just partly correct. Does anyone know which keys I have to use in order to map my table into the stringsdict table? Which keys/keywords are necessary?
In the stringsdict file you can only have the keys zero, one, two, few, many, and other. That is all you actually need. iOS has its own data (based on information from the Unicode standard) that tells it which of those keys to use based on the actual number.
This is covered in the (now archived) Internationalization and Localization Guide, specifically the Handling Noun Plurals and Units Of Measure chapter with specifics about the stringsdict file in Appendix C.
You may also find language specific rules from Unicode. Scroll down to Lithianian and you will see the built in rules on how the category is used with a given number.
In short, you want the following for your "events" in Lithuanian:
one - %d įvykis
few - %d įvykiai
other - %d įvykių
iOS will know to use one for 1, 21, 31, 41, etc. It will know to use few for 2~9, 22~29, etc. It will know to use other for 0, 10~20, 30, etc.

gnuplot: How to enable thousand separators (digit grouping)?

I'm on German Windows 8.1 64Bit with gnuplot 4.6.5, using the svg terminal. If I plot datafiles that have big numbers, like "one million", gnuplot does not print a digit grouping sign.
For example, if my datafile has values in the order of one million, I want the numbers at the y-axis be displayed as 1.000.000 (with . being the group sign, not the decimal sign!), but gnuplot gives me just 1000000.
The option set decimalsign locale just changes the decimal sign (separator between whole number and fractional part, like 1+1/2 = 1,5 with , being the decimal sign). But neither setting decimalsign nor not calling this command at all shows digit grouping signs in the plot. I only get ugly 1000000 or 1500000 instead of 1.000.000 or 1.500.000.
I also tried
set decimal locale
set format y "%'f"
which just gives me at all tics the label "%'f", instead of the numbers! Each tic has just "%'f", again and again. It just prints the format string as is into the plot and no numbers at all. The console output is decimal_sign in locale is , which is correct for german locale, so gnuplot recognizes it correctly. In my control panel of Windows the thousand separator is set correctly to . and the decimal sign to , too.
Setting tic by tic by hand is no option. I.e. set ytics add ('1.000.000' 1e6) for dozenz of dozenz tics is no option for me.
How do I automatically get thousand separators in gnuplot?
That seems not to work on Windows. From the gnuplot documentation
Internationalization (locale settings): Gnuplot uses the C runtime library routine setlocale() to control locale-specific formatting of input and output number, times, and date strings. The locales available, and the level of support for locale features such as "thousands’ grouping separator", depend on the internationalization support provided by your individual machine.
And judging from questions like How can I add a thousands separator to a double in C on Windows? Printing integers with thousands separators in Windows using C it is not possible since the apostrophe in the format string is a Unix specialty and not a C standard.
I think there is no workaround to get this working on Windows with autoscaling.
For the records: The following script works fine on Linux:
set format "%'.0f"
set xrange [0:1e6]
plot x
Only ., , and are possible as separator (at least Linux). E.g. "french" gives a space:
set decimalsign locale "french" # thousand separator becomes ` `
set decimalsign "."
set format "%'.2f"; # `'` activates the thousand separator
pl [0:1e5] x
Not the most glamorous of solutions, especially if you've got a lot of tics but you could do something like
set ytics ("1.000.000" 1e6, "1.500.000" 1.5e6, etc.)
I'd be interested to hear of anything nicer!
Just for fun and feasibilty... If you absolutely need thousand separators, you can construct a workaround for Windows (with some complexity and limitations). Tested with gnuplot 5.2.6.
Basic recipe:
define a function which converts numbers into text with thousand separators.
set the tic labels yourself using text with thousand separators
place the tic labels by trying to "mimic" gnuplot's setting of tic labels. For this, use gnuplot's suggestions about the scaling by plotting to a dummy terminal first. For this, this post of #Christoph is very helpful.
Code:
### add thousand separators to tic labels for Windows
reset session
# settings for thousand separator
ts = "'" # thousand separator
ThousandSeparator(a,ts) = abs(a)>=1000 ? (TS_a=sprintf("%.0f",a), TS_b=strlen(TS_a), \
TS_c=strstrt(TS_a,'-')+1, TS_d=TS_c>1?'-':'', (sum[TS_i=TS_c:TS_b] \
(TS_d=((TS_b-TS_i)%3==0&&(TS_i<TS_b)?TS_d.TS_a[TS_i:TS_i].ts:TS_d.TS_a[TS_i:TS_i]),\
0), TS_d)) : sprintf("%g",a)
# settings for (auto-)tics
range(axis) = axis eq "y" ? abs(GPVAL_Y_MAX-GPVAL_Y_MIN) : abs(GPVAL_X_MAX-GPVAL_X_MIN)
power(axis) = 10.**int(sprintf("%.15e",range(axis))[strstrt(sprintf("%.15e",range(axis)),"e")+1:])
rangenorm(axis) =range(axis)/power(axis)
posns(axis) = 20.0 / rangenorm(axis)
tics(axis) = \
posns(axis)>40?0.05:posns(axis)>20?0.1:posns(axis)>10?0.2:posns(axis)>4? \
0.5:posns(axis)>2?1:posns(axis)>0.5?2:ceil(range(axis))
ticstep(axis) = tics(axis) * power(axis)
set xrange[0:1e6]
set terminal push # save current terminal
set terminal unknown
plot x lc rgb "web-green"
set terminal pop # restore terminal
# set xtics
do for [i=0:ceil(range("x")/ticstep("x"))+1] {
set xtics add (ThousandSeparator(GPVAL_X_MIN+i*ticstep("x"),"'") GPVAL_X_MIN+i*ticstep("x"))
}
# set ytics
do for [i=0:ceil(range("y")/ticstep("y"))+1] {
set ytics add (ThousandSeparator(GPVAL_Y_MIN+i*ticstep("y"),"'") GPVAL_Y_MIN+i*ticstep("y"))
}
replot
### end of code
Limitations:
if the begin of the axis (e.g. GPVAL_X_MIN) is not identical with the first tic label, the above procedure doesn't work (yet).
However, I haven't yet found the value which gnuplot sets as first tic value. There seems to be no GPVAL_... variable for this. Maybe it can be extracted somehow?
Example 1: (works ok)
set xrange[0:1e6]
Example 2: (doesn't work, because GPVAL_X_MIN=-50000 but first tic should be at 0)
set xrange[-50000:1e6]

Replacing \emptyset symbol with one from a different font family in LaTeX

So I quite like the Anttor fonts and I'd like to use them in LaTeX. Everything is nice, except the \emptyset symbol is ugly. I'd like to just \renewcommand the null set command, but I can't work out how to call, say, the computer modern \emptyset when using a different font family everywhere else.
Is there a quick way to do this?
\font\cmsy = cmsy10 at 12pt
\hbox{\cmsy \char 59}
\font\msbm = msbm10 at 12pt
\hbox{\msbm \char 63}
(source: imageban.ru)

Resources