Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Alexey Torgashin via fpc-pascal
How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, But fpparsettf.pp has this: TTFFileInfo = class(TObject) ... public // Load a TTF file from file or stream. Procedure LoadFromFile(const AFileName : String); Procedure LoadFr

[fpc-pascal] SeekEof issue & 2020 blog post by A Stolyarov

2023-09-11 Thread Alexey Torgashin via fpc-pascal
Translation of blog post http://www.stolyarov.info/node/290 from Ru to En. Sep 6 2020. Author: Andrey Stolyarov, author of Ru books about programming. == I'm trying to convince FPC men to finally fix SeekEof: https://forum.lazarus.freepascal.org/index.php/topic,51353.0.html Tellingly, I even se

Re: [fpc-pascal] Is there a Pos() function for TBytes?

2023-04-20 Thread Alexey Torgashin via fpc-pascal
function PosInBytes(const Pattern: byte; Target: TBytes): integer; Let's use IndexByte standard procedure here? Maybe also in the 1st overloaded code too? Alex ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cg

Re: [fpc-pascal] Pause Key

2023-04-14 Thread Alexey Torgashin via fpc-pascal
if Key=VK_PAUSE then begin do_something; Key:=0; end; Yes. And I tested the Pause/Break key in the Lazarus program CudaText. I can assign the key to any action (in the Command Palette, press F9), and it works then. E.g. action "toggle statusbar" works then. ShortcutToText() for this key sh

Re: [fpc-pascal] SerReadTimeout question

2022-09-19 Thread Alexey Torgashin via fpc-pascal
I wrote this info to new page https://wiki.freepascal.org/Serial_unit , welcome to add more info there. Alexey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TFPHTTPServer and HTTPS

2022-08-23 Thread Alexey Torgashin via fpc-pascal
You need to set your certificate details as well: fServer.UseSSL := fUseSSL; I just saved this info to wiki: https://wiki.freepascal.org/fphttpserver#Support_for_HTTPS ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepa

Re: [fpc-pascal] Workaround for fpcres requiring absolute path

2022-06-28 Thread Alexey Torgashin via fpc-pascal
TEMPLATE_UTILS_HEADER RCDATA "./resources/utils.h" I made an experiment with fresh fpcres compiled from source. It works even with your case! Ie with "./folder/filename". I created simple RC file, added there the line with "./folder/a.bmp", added BMP file in that folder, called fpcres u

Re: [fpc-pascal] Workaround for fpcres requiring absolute path

2022-06-27 Thread Alexey Torgashin via fpc-pascal
TEMPLATE_UTILS_HEADER RCDATA "./resources/utils.h" My .rc file has this line, so it seems sometimes relative path is supported: tatbutton BITMAP "res\\tatbutton.bmp" Alexey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://l

[fpc-pascal] Improve TStringList.Text setter?

2022-05-05 Thread Alexey Torgashin via fpc-pascal
(I posted to the forum, but it's better to post here.) TStringList.Text setter does this Procedure TStrings.DoSetTextStr(const Value: string; DoClear : Boolean); ... if FLineBreak=sLineBreak then begin While GetNextLine (Value,S,P) do Add(S)

Re: [fpc-pascal] New FCL-CSS package in the GitLab repo

2022-03-28 Thread Alexey Torgashin via fpc-pascal
Currently if I run "extractcssclasses" with Bootstrap 4 (or 5) CSS file (not minified) I get it work for more than 30 seconds, then I stopped it, too long. Output file (parameter "--output=4.txt") not created. CPU Core i3. Linux x64. AT ___ fpc-pascal

Re: [fpc-pascal] New FCL-CSS package in the GitLab repo

2022-03-28 Thread Alexey Torgashin via fpc-pascal
I will add some options to interpret "*zoom" as a property name, but they will off by default. OK thanks. Can you try now with CSS (usual or minified) from https://getbootstrap.com/ ? See 'download' which gives file bootstrap-5.1.3-dist.zip . Complex places: .link-dark:hover, .link-dark:

Re: [fpc-pascal] New FCL-CSS package in the GitLab repo

2022-03-27 Thread Alexey Torgashin via fpc-pascal
"*zoom", really ? That's not even valid CSS syntax. I checked 2 EBNF grammars: neither will allow this. I checked the W3 spec: Confirms this is simply not valid syntax. But "*.nnn" is valid one. https://css-tricks.com/almanac/selectors/u/universal/ So if the "*" has meaning in one context, it

[fpc-pascal] New FCL-CSS package in the GitLab repo

2022-03-27 Thread Alexey Torgashin via fpc-pascal
@Michael Van Canneyt I didn't test but I hope this package can parse this _minified_ CSS file? Attached on the forum https://forum.lazarus.freepascal.org/index.php/topic,58853.msg438550.html#msg438550 It has many tricks. E.g. @media blocks (@media supports nested blocks, not only 1 level), e.