Árvore de páginas

Função: AddFontAlias

Cria uma tabela de conversão de fontes com origem e destino. Assim, se a fonte origem for utilizada em um objeto, o sistema automaticamente assumirá a fonte destino.

AddFontAlias ( < cOrigem>, < cDestino> ) --> Nil

NomeTipoDescriçãoObrigatórioReferência
cOrigemCaracterIndica a fonte que será incluída na lista para conversão. X
cDestinoCaracterIndica a fonte destino à conversão. X
Nil (Nulo)

Utilize essa função somente nos programas executados através do Smart Client.

#DEFINE CRLF Chr(13)+Chr(10)User Function Exemplo()Local aFontList := NilLocal lFontOrigem := .F., lFontDestino := .F.Local oDialog := NilLocal oFontOrigem := Nil, oFontDestino := NilLocal oSayOrigem := Nil, oSayDestino := Nil  aFontList := GetFontList()  AEval(aFontList, {|aFontList|IIf(aFontList == "Tahoma", lFontOrigem  := .T.,)})  AEval(aFontList, {|aFontList|IIf(aFontList == "Arial" , lFontDestino := .T.,)})  If !(lFontOrigem .And. lFontDestino)    Return MsgStop("Não foi possível encontrar a fonte origem ou a fonte destino")  EndIf  AddFontAlias("Tahoma", "Arial")  oFontDestino := tFont():New("Arial" , , -12, , .F., , , , , .F., .F.)  oFontOrigem  := tFont():New("Tahoma", , -12, , .F., , , , , .F., .F.)//+----------------------------------------------------------------------------+//|Cria o diálogo para exemplificar o uso do AddFontAlias                      |//+----------------------------------------------------------------------------+  oDialog := tDialog():New()    oDialog:cTitle  := "Exemplo do AddFontAlias"    oDialog:nWidth  := 800    oDialog:nHeight := 600  oSayOrigem := tSay():New(10, 10, {||"Tahoma -> Arial"}, oDialog, , oFontOrigem , , , , .T., , , 200, 20)  oSayOrigem := tSay():New(40, 10, {||"Arial"          }, oDialog, , oFontDestino, , , , .T., , , 200, 20)//+----------------------------------------------------------------------------+//|Apresenta o diálogo                                                         |//+----------------------------------------------------------------------------+  oDialog:Activate()Return 

Exemplo da função AddFontAlias
Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10 , ByYou Application Server

  • Sem rótulos