Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: mtx on August 24, 2016, 01:19:13 PM
-
Is there a way to load a ttf or otf for a layout that's not installed in the OS (Windows, OS X, 'nix)?
-
Yes. Refer to the docs. It will load the font from your layouts root directory, or any path you provide.
-
Hmmm. I really can't find anything about loading fonts here https://github.com/mickelson/attract/blob/v2.1.0/Layouts.md or here: https://github.com/mickelson/attract/wiki/Introduction-to-Squirrel-Programming
-
Hi mtx,
You don't need to "load" the font, just place it in your layout folder, then you can change the layout font according to your font name using fe.layout.font = "YourFont".
-
Thanks for clearing that up, ptiwee!
-
because no work
listbox.font="[Emulator]";
??
-
because no work listbox.font="[Emulator]";
??
Magic tokens might now work there.
-
no is for magic token. if put
local text = AAE;
listbox.font=AAE;
no work eiter
-
no is for magic token. if putlocal text = AAE;
listbox.font=AAE;
no work eiter
Have you declared the AAE variable? Or is text a string and you forgot your quotes?
-
perdon, no se explicarme en ingles...
tengo una carpeta llamada fuentes donde tengo la fuente AAE.otf
si pongo los codigos
listado.font="fuentes/" + "[Emulator]" + ".otf";
listado.font="fuentes/" + "[Emulator]";
listado.font="fuentes/AAE.otf";
listado.font="fuentes/AAE";
local fuente= fe.add_text("fuentes/"+"[Emulator]",0,0,0,0);
listado.font=fuente;
y no se cuantas conbinaciones mas que he intentado esta tarde no he conseguido que me coja la fuente de ninguna forma
si hay espacios o codigo mal puesto puede ser cosa del traductor de google que hace lo que le da la gana. he intentado corregirlo pero igual se me ha colado alguno :(
---------------------------------
Sorry, I will not explain myself in English ...
I have a folder called fonts where I have the source AAE.otf
If I put the codes
listado.font = "fuentes/" + "[Emulator]" + ".otf";
listado.font = "fuentes/" + "[Emulator]";
listado.font = "fuentes/AAE.otf";
listado.font = "fuentes/AAE";
Local fuente= fe.add_text ("fuentes/" + "[Emulator]", 0,0,0,0);
listado.font = fuente;
And I do not know how many more combinations I've tried this afternoon I have not managed to get the source in any way
If there are spaces or poorly placed code may be thing of the google translator that does what he wants. I tried to correct it but the same one has sneaked to me :(