Re: [Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread R0b0t1 via Lazarus
On Mon, Oct 16, 2017 at 2:48 PM, Juha Manninen via Lazarus
 wrote:
> On Mon, Oct 16, 2017 at 8:56 PM, R0b0t1 via Lazarus
>  wrote:
>>
>> Is it not possible to bundle supported resources in the LCL? That seems
>> like the typical solution for Windows. On other OSes this is less proper,
>> but I have still seen it done.
>
>
> Excuse me?
> How could LCL bundle the fonts used by your OS?
>

It is not necessary to rely on only the system font collection, even
when using WinAPI forms:
https://msdn.microsoft.com/en-us/library/system.drawing.text.privatefontcollection.aspx.
Something similar is done in C++.

Admittedly there does seem to be some confusion about whether you can
make certain UI objects (non-GDI+, specifically) take on face of these
fonts, but I suspect you can, as it seems that there is a common
underlying graphics system that the old APIs use. Even if not it would
be possible to distribute an open font with Lazarus/the LCL and
install it when Lazarus/the LCL is installed.

R0b0t1.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread Juha Manninen via Lazarus
On Mon, Oct 16, 2017 at 8:56 PM, R0b0t1 via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> Is it not possible to bundle supported resources in the LCL? That seems
> like the typical solution for Windows. On other OSes this is less proper,
> but I have still seen it done.
>

Excuse me?
How could LCL bundle the fonts used by your OS?

Juha
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread R0b0t1 via Lazarus
On Monday, October 16, 2017, Juha Manninen via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:
> On Mon, Oct 16, 2017 at 4:43 PM, Martok via Lazarus
>  wrote:
>> when I checked what HTML2TextRenderer uses to translate list items, I
found that
>> since rev 55743 it uses U+26AB MEDIUM BLACK CIRCLE ⚫ and U+26AA MEDIUM
WHITE
>> CIRCLE ⚪.
>
> No. Since r55743 it uses one of the star emojis.
> See in constructor THTML2TextRenderer.Create:
>   fListItemMark:='✶ ';
>   //fListItemMark:='✳ ';
>   //fListItemMark:='✺ ';
>   //fListItemMark:='⚫ ';
>   //fListItemMark:='⚪ ';
>
> I left the other potential choises in comments there for easy comparison.
>
>> Could someone please test this on other widgetsets,
>
> It is not related to widgetsets anyhow. It only depends on the font
> your system uses.
> I also had problems seeing Unicode emojis on Windows but never on Linux
distros.
> To my surprise some fellow Lazarus developers complained they don't
> render properly in their Linux systems. That is why I changed the
> title emoji from a small diamond (outside BMP) to a big diamond
> (belongs to BMP). For some reason their fonts support it better.
>
>   //fTitleMark:=''; <-- this did not show in some people's system.
>   //fTitleMark:='◆';
>   //fTitleMark:='◇';
>   fTitleMark:='◈';
>   //fTitleMark:='◊';
>
> The stars and circles mentioned earlier belong to BMP.
>
>> so I have an idea whether/what/where to report this?
>
> Report to your OS manufacturer / project.
> In case of Windows: Microsoft.  Let's see how quickly they fix it.
> In any case those widely used Unicode emojis really must be supported.
> There is no excuse.
>

Is it not possible to bundle supported resources in the LCL? That seems
like the typical solution for Windows. On other OSes this is less proper,
but I have still seen it done.

R0b0t1.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread Juha Manninen via Lazarus
On Mon, Oct 16, 2017 at 4:43 PM, Martok via Lazarus
 wrote:
> when I checked what HTML2TextRenderer uses to translate list items, I found 
> that
> since rev 55743 it uses U+26AB MEDIUM BLACK CIRCLE ⚫ and U+26AA MEDIUM WHITE
> CIRCLE ⚪.

No. Since r55743 it uses one of the star emojis.
See in constructor THTML2TextRenderer.Create:
  fListItemMark:='✶ ';
  //fListItemMark:='✳ ';
  //fListItemMark:='✺ ';
  //fListItemMark:='⚫ ';
  //fListItemMark:='⚪ ';

I left the other potential choises in comments there for easy comparison.

> Could someone please test this on other widgetsets,

It is not related to widgetsets anyhow. It only depends on the font
your system uses.
I also had problems seeing Unicode emojis on Windows but never on Linux distros.
To my surprise some fellow Lazarus developers complained they don't
render properly in their Linux systems. That is why I changed the
title emoji from a small diamond (outside BMP) to a big diamond
(belongs to BMP). For some reason their fonts support it better.

  //fTitleMark:=''; <-- this did not show in some people's system.
  //fTitleMark:='◆';
  //fTitleMark:='◇';
  fTitleMark:='◈';
  //fTitleMark:='◊';

The stars and circles mentioned earlier belong to BMP.

> so I have an idea whether/what/where to report this?

Report to your OS manufacturer / project.
In case of Windows: Microsoft.  Let's see how quickly they fix it.
In any case those widely used Unicode emojis really must be supported.
There is no excuse.

Juha
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread Vojtěch Čihák via Lazarus

Hi,
 
it seems OK on Qt and GTk2 at r.56055.
 
V.
__

Od: Martok via Lazarus 
Komu: laza...@lists.lazarus.freepascal.org
Datum: 16.10.2017 15:43
Předmět: [Lazarus] Rendering Issue Emoji for HTML List Items


...

Could someone please test this on other widgetsets, so I have an idea
whether/what/where to report this?
Thanks!


--
Regards,
Martok

Ceterum censeo b32079 esse sanandam.

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus 


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Rendering Issue Emoji for HTML List Items

2017-10-16 Thread Martok via Lazarus
Hi all,

when I checked what HTML2TextRenderer uses to translate list items, I found that
since rev 55743 it uses U+26AB MEDIUM BLACK CIRCLE ⚫ and U+26AA MEDIUM WHITE
CIRCLE ⚪. There seems to be some issue with these codepoints when rendering them
to a Canvas on win32 widgetset: they only render correctly in an application
when they are not the first character in a sequence OR the host is Win10, but
never in the Lazarus SynEdit.

The slightly smaller versions U+25CF BLACK CIRCLE ● and U+25CB WHITE CIRCLE ○
work fine.

Example (make sure to save in UTF8, default in Lazarus):
---
procedure TForm1.FormPaint(Sender: TObject);
var
  s: string;
begin
  s:= '●⚫';
  Canvas.TextOut(100,100,s);
  s:= '⚫';
  Canvas.TextOut(100,150,s);
end;
---
The first TextOut produces 2 circles (the first one being smaller), the second a
"missing glyph" box. The second line will also do that in the code editor. It
may work in the application on Win10, but not on older systems.

Could someone please test this on other widgetsets, so I have an idea
whether/what/where to report this?
Thanks!


-- 
Regards,
Martok

Ceterum censeo b32079 esse sanandam.

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] FPVectorial

2017-10-16 Thread Michael Schnell via Lazarus
I rather unsuccessfully tried to use the pdf decoder example provided 
here  -> http://wiki.lazarus.freepascal.org/fpvectorial .


I needed to add the package fpvectorial to my project. Now I can do "use 
fpvectorial".


The project needs "use pdfvectorialreader". To allow for this I needed 
to add the appropriate file / search directory 
(pdfvrsemantico\pdfvrsemantico) to the project.


Then it did not compile, as "TvVectorialDocument" does not feature the 
property "EndPath" (and others).


So for initial testing, I commented some four lines out and was able to 
compile the project.


But when starting, I get an exception in what I suppose is Portuguese.

I used 1.6.4. Is a newer Lazarus version improved on that behalf ?

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus