# How to change the size of Georgian language text

**URL:** <https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098>\
**Category:** Coding Questions\
**Created:** [September 21, 2019, 9:11pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098 "2019-09-21T21:11:05Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 21, 2019, 9:11pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/1 "2019-09-21T21:11:05Z")

</div>

I want to change the size of Georgian-language text that I have input from a .txt file in the data folder (.txt file encoded in UTF-8). I can display the Georgian script (this is Georgian language script, not the Georgia text font) in my Processing window. But when I change its size with textSize(), the program displays a series of boxes, one for each letter, but no actual text. This also happens if I input the text directly into the text() line command. It also happens if I specify a font (and size) with PFont. Any ideas? Here’s the code—any help appreciated.

```auto
String[] s = loadStrings("Georgian_01.txt");
size(500, 300);

//textSize(100);
textAlign(CENTER);
fill(0);
text(s[0], width/2, height/2);

```

---

<div class="post-metadata">

**Author:** ![Xelo](https://avatars.discourse-cdn.com/v4/letter/x/9fc348/32.png) [@Xelo](https://discourse.processing.org/u/Xelo)\
**Post date:** [September 22, 2019, 6:03am UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/2 "2019-09-22T06:03:29Z")

</div>

try switching the font to something that supports unicode like calibri

```auto
void setup(){
  size(1000,570,P2D);
  String st = "წამებაჲ წმიდისა შუშანიკისი დედოფლისაჲabc";
  fill(0);
  textFont(createFont("Calibri",48));
  text(st,300,300);
}

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5ae87e5d921781a85d031f4090a2beb7ca98dae8.png)

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 22, 2019, 12:36pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/3 "2019-09-22T12:36:18Z")

</div>

Brilliant!! Works perfectly. Thanks so much!

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 22, 2019, 12:52pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/4 "2019-09-22T12:52:18Z")

</div>

OK—question #2: Now I can change the size of the font, but for the purposes of my program, I’d like to be able to randomize it. If I insert this,

textSize(random(10, 48));

the result reverts to the little boxes instead of letters. It does randomize the size of the boxes. Also, if I randomize the size in createFont, it does the same thing. I could work around this, but I’d rather not. Ideas appreciated!

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [September 22, 2019, 3:19pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/5 "2019-09-22T15:19:15Z")

</div>

There is also a menu entry to make fonts

Menu tools I think. Maybe you can make a better font here prior to using it

OR there are only certain text sizes supported by the font. Use a for loop to find out

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 22, 2019, 9:04pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/6 "2019-09-22T21:04:35Z")

</div>

Many thanks! Excellent idea about the for loop. I tried it, and it seems that textSize is interfering in some way. So here’s the for loop. Where textSize is 0 (so the command doesn’t do anything), you get actual text. Otherwise just boxes, even at the created size of 80.

```auto
String[] s = loadStrings("Georgian_01.txt");
size(1400, 1000);
textFont(createFont("Calibri", 80));
textAlign(CENTER);
fill(0);  

for (int i = 0; i<81; i++) {
  textSize(i);
  fill(255, 0, 0);
  text(i, width/8, 100+i*10); // NUMBER OF EACH LOOP
  fill(0);
  text(s[0], width/2, 100+i*10); // OUTPUT OF TEXT
}  

```

Here’s the result:

 ![Georgian_testfile_01](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/adc2b7707ce0454ab3a7844aff5ceb3744a7b750.png)  
However, if you create the font every time through the loop, then you get actual text every time.

```auto

String[] s = loadStrings("Georgian_01.txt");
size(1400, 1000);
textAlign(CENTER);
fill(0);  

for (int i = 1; i<81; i++) {
  textSize(i);
  fill(255, 0, 0);
  textFont(createFont("Calibri", i));
  text(i, width/8, 100+i*10); // NUMBER OF EACH LOOP
  fill(0);
  text(s[0], width/2, 100+i*10); // OUTPUT OF TEXT
}  

```

 ![Georgian_testfile_02](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4e63696a8979a3746b515db8eb7f0fe57e31f481.png)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [September 23, 2019, 6:36am UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/7 "2019-09-23T06:36:46Z")

</div>

Looks like a bug to me…

I mean…what?!

Why doesn’t textSize work??

I think with Arial font etc. it works - did you try?

So it might be a flaw in this specific font.

Do you have another font for your language or can retrieve it from the internet?

Did you try to male the font using  
menu tools | make font?

When you use the font you made there it’s maybe working?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 23, 2019, 6:57am UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/8 "2019-09-23T06:57:58Z")

</div>

you never give the file you have testing with?  
so we can use only like

> [@Xelo](#):
>
> String st = “წამებაჲ წმიდისა შუშანიკისი დედოფლისაჲabc”;

but that works here ( win 10 / english / processing 3.5.3 )

 ![text_sizetest](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/fcde552a07a2c5887ed8e9e9fdd1ba64e714a068.png)

so your file and your system setup might also influence your result?

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 23, 2019, 8:31pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/9 "2019-09-23T20:31:38Z")

</div>

OK, tried Arial. Same result (little boxes instead of characters) if I create the font dynamically, using this:

```auto
textFont(createFont("Arial", 40));

```

If I use the font selection tool and put ArialMT-80 in my data folder, then I use this code:

```auto
PFont f;
f = loadFont("ArialMT-80.vlw");
textFont(f, 80);

```

Then when I run the program, I get no text at all (see below) and the editor window says, “No glyph found for the [strange symbol here] (\u10D8) character.” The number in parentheses varies. So, creating the font dynamically at least gives me little boxes.

 ![Georgian_testfile_03readtext_ariel](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c653647c328acd30f6e6300513fc9ace69dd7282.png)

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 23, 2019, 8:45pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/10 "2019-09-23T20:45:29Z")

</div>

I am jealous! I run the exact same code as you have (see below), using a string instead of reading from a file, and get boxes in place of the Georgian text, except in the 0 loop. Roman alphabet characters are OK.

```auto
//String[] s = loadStrings("Georgian_01.txt");
String s = "გამარჯობა მსოფლიოabc";
size(1400, 1000);
textFont(createFont("Calibri", 40));
textAlign(CENTER);
fill(0);  

for (int i = 0; i<81; i+=5) {
  textSize(i);
  fill(255, 0, 0);
  text(i, width/8, 100+i*10); // NUMBER OF EACH LOOP
  fill(0);
  text(s, width/2, 100+i*10); // OUTPUT OF TEXT
}  
save("Georgian_testfile_03readtext.png");

```

 ![Georgian_testfile_03readtext](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f8f9a9ccdd60c34647d6a0739050f9fade56f985.png)

I’m using a new-ish MacBook running OS10.14.5 and processing 3.5.3. Maybe the Mac is the problem…

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 23, 2019, 10:20pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/11 "2019-09-23T22:20:26Z")

</div>

one more test:  
same code on RPI

```auto
Raspbian GNU/Linux 10
DEBIAN buster
Linux version 4.19.66-v7+
Raspberry Pi 3 Model B Plus Rev 1.3

```

 ![text_sizetest_RPI](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/52769a2acd64c541bcd7ba719ee9c5a2f28481da.jpeg)

note: win 10 and Raspbian, both are english systems and i get the [X] in the code editor, but it works in the canvas???

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [September 24, 2019, 3:48am UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/12 "2019-09-24T03:48:14Z")

</div>

Hello @steele ,

Your text:

> [@steele](#):
>
> “გამარჯობა მსოფლიოabc”

* * *

I had to find a font (Monospaced and some others worked) that displayed “your text” in my IDE:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5026e5467e97d023d0b912264bced86a3c2b1a95.png)

* * *

I scrolled through fonts with “Create Font” and found a font that displayed “your text”:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/71fd22e83b94d9ddb45e612781493f24e034a021.png)

* * *

This did not work:

> textFont(createFont(“Calibri”, 48));

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7304b550a65b224eec59125563e22e56b7f85adb.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3b6835d4bf20329590975ff23da93930f67fcf91.png)

* * *

Using a “NonExistentFont” worked and it displayed this message:

> “NonExistentFont” is not available, so another font will be used. Use PFont.list() to show available fonts.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/265188384c29150e7b5cab4a6834c9608e8f229f.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/87da4c7fc2542d4dd82b598ea21f5ec1b08b1b24.png)

Which font was used? 🙂

* * *

I tried a font that displayed “your text” in “Create Font” and was also in the PFont.list().

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/535b39a9699d9aeea1f054635837549b02050492.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/19ab4f6cbb25adf268567decc5bdcb23a7093467.png)

* * *

Processing 3.5.3  
W10 Pro 1809

🙂

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 24, 2019, 8:42pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/13 "2019-09-24T20:42:48Z")

</div>

Hi glv—Thanks. The last 2 posts are making me think I should switch to a Windows machine. (I’m running Processing 3.5.3 on a MacBook.) I tried your solution, but when I get to the “Sample Text” window, it’s different from yours. It will let me type into it from the keyboard, but–unbelievably–there’s no way to paste. The Edit function disappears from the IDE function bar when you open Create Font. I can’t type in the Georgian text, so I’m stuck. Ugh.

---

<div class="post-metadata">

**Author:** ![steele](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@steele](https://discourse.processing.org/u/steele)\
**Post date:** [September 24, 2019, 8:45pm UTC](https://discourse.processing.org/t/how-to-change-the-size-of-georgian-language-text/14098/14 "2019-09-24T20:45:35Z")

</div>

Hi kll—Thanks. But now I’m envious of the Raspberry Pi. 😁 With that and a Windows machine, maybe I could make this work.
