Gestion des textes avec eFORTH pour le web

publication: 25 mars 2023 / mis Ă  jour 25 mars 2023

Read this page in english

 


web definitions 
 
JSWORD: strokeText { a n x y -- }  
  context.ctx.strokeText(GetString(a, n), x, y);  
~  
 
\ possible values: start end left right or center; default: start 
JSWORD: textAlign { a n -- }  
  context.ctx.textAlign = GetString(a, n);  
~  
forth definitions 
 
600 constant ctxWidth 
300 constant ctxHeight 
 
$000000 constant fullBlack 
$ff0000 constant fullRed 
$0000ff constant fullBlue 
 
web gr 
ctxWidth ctxHeight window 
 
s" bold 48px serif" font 
s" THIS IS A TEST" 180 100 strokeText  
 
s" center" textAlign 
$ff0000 color! 
s" bold 48px serif" font 
s" THIS IS A TEST" 180 160 strokeText  

Legal: site web personnel sans commerce / personal site without seling