Can we change fonts (to fixed-width?)

SparksMaths shared this question 4 years ago
Answered

I'm working on a cryptography tool again, and it would be really useful to have text displayed in a fixed-width font (like 'courier') - the same font as is used when exemplifying code like this:

    this is some plaintext

    uijt jt tpnf qmbjoufyu

This helps line up plaintext with ciphertext and keep letters aligned all the way along. Is there a way to do this easily in Geogebra?

I guess I'm asking if there's likely to be more font control in future updates (or if I've missed some font controls somewhere else)?


Thanks,

Ben

Comments (5)

photo
1

Try

    Sequence[Text[Take[text1, i, i], (i, 0)], i, 1, Length[text1]]

photo
1

Lovely idea. It does mean the text is co-ordinate system dependent... but I can work with that! Thanks very much!

photo
1

Thanks rami - very efficient. It's also helped me sort out some other 'text to list' battles I was having... much appreciated.

Ben

photo
1

You can get it to work independently of the coordinate system by defining

    wideChar = "W"

and measuring that :)


http://tube.geogebra.org/m/1327733

photo
1

Hi,


this LaTex \texttt{} work also in GGTube:


Example:

Define Point A and

text1 = Text["\texttt{abcdefghijklmnopqrs\\1234567890123456789}", A, true, true]


Raymond

© 2019 International GeoGebra Institute