Graphical text lazarus / 39-Graphics ---------------------------------------------------------------------- pascal111 · 2021-06-02 12:33 هل هناكـ أداة من أدوات الـ graphics ما يجعلني أعرض النّص التالي كأحرف رسوميّة وليس كنص عادي؟ google translate: "Is there a graphics tool that will allow me to display the following text as graphic characters and not as plain text?" QuoteEl pan con la carne es el maestro de la comida. ---------------------------------------------------------------------- speter · 2021-06-02 13:09 If you mean can you "draw" text, yes! Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i canvas.textout(10,10,'foo'); The code above will draw the specified phrase on a canvas. If you start a new project and put that code in the form.create function, the phrase will be drawn on the form's canvas. cheers S. ---------------------------------------------------------------------- VTwin · 2021-06-02 13:31 Or: https://wiki.lazarus.freepascal.org/BGRABitmap_tutorial_12 ---------------------------------------------------------------------- winni · 2021-06-02 18:59 Hi! You can rotate the text on the canvas. Font.Orientation  are 0.1  degrees, so 900 means 90 degrees. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  Canvas.Font.Orientation := 900; Canvas.TextOut( 200, 200,  "Upside Down"); Winni ---------------------------------------------------------------------- pascal111 · 2021-06-02 19:21 Quote from: winni on June 02, 2021, 08:59:14 pmHi! You can rotate the text on the canvas. Font.Orientation  are 0.1  degrees, so 900 means 90 degrees. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  Canvas.Font.Orientation := 900; Canvas.TextOut( 200, 200,  "Upside Down"); Winni جميل "es hermoso" google translate: "Beautiful "es hermoso"" ---------------------------------------------------------------------- pascal111 · 2021-06-02 19:23 أشكُرُكُما @speter وَ@VTwin. google translate: "Thank you @speter and @VTwin." ---------------------------------------------------------------------- winni · 2021-06-02 21:04 Hi! And the shading of a text is done with a simple trick: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const  myText = 'Some Text';...Canvas.Font.color := clSilver;Canvas,TextOut (10,10,myText); Canvas.Font.color := clBlack;Canvas,TextOut (11,11,myText);...  Winni ---------------------------------------------------------------------- pascal111 · 2021-06-02 21:48 Quote from: winni on June 02, 2021, 11:04:00 pmHi! And the shading of a text is done with a simple trick: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const  myText = 'Some Text';...Canvas.Font.color := clSilver;Canvas,TextOut (10,10,myText); Canvas.Font.color := clBlack;Canvas,TextOut (11,11,myText);...  Winni جرّبتُ ذلكـ ولكن هذا الذي خرج معي كما في الصورة: google translate: "I tried it but this is what came out with me as in the picture:" Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormPaint(Sender: TObject); const   mytext='El pan con la carne es el maestro de la comida.'; begin   Canvas.Font.Orientation := 400;   Canvas.Font.color := clblue;  canvas.textout(100,250,mytext);    Canvas.Font.color := clBlack;  canvas.textout(102,252,mytext);end; ---------------------------------------------------------------------- speter · 2021-06-03 01:49 try adding Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i canvas.brush.style := bsClear;before the first textout. You may need to tweak the offset to get the effect you want. At present you have (+2,+2) which may be too much (with small text). cheers S. ---------------------------------------------------------------------- pascal111 · 2021-06-03 11:57 Quote from: speter on June 03, 2021, 03:49:46 amtry adding Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i canvas.brush.style := bsClear;before the first textout. You may need to tweak the offset to get the effect you want. At present you have (+2,+2) which may be too much (with small text). cheers S. كلامُكـ صحيح! والآن أصبح ما قاله @winni ممكن التنفيذ. google translate: "You are right! Now what @winni said can be done." Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormPaint(Sender: TObject); const   mytext='El pan con la carne es el maestro de la comida.'; begin   Canvas.Font.Orientation := 400;   Canvas.Font.color := clSilver;  canvas.brush.style := bsClear;  canvas.textout(100,250,mytext);    Canvas.Font.color := clBlack;  canvas.textout(101,251,mytext); end;