On Thu, 1 Feb 2018, Sven Barth via fpc-devel wrote:

Am 01.02.2018 14:31 schrieb "Michael Van Canneyt" <mich...@freepascal.org>:



On Thu, 1 Feb 2018, Denis Kozlov wrote:

A proposal:
1) Use windirs.GetWindowsSpecialDir in fpttf.pp, which already uses a more
backwards compatible SHGetFolderPath().
2) Optionally, improve windirs.GetWindowsSpecialDir to use a newer
SHGetKnownFolderPath() when it is available.

If this is suitable, I can produce a patch for both.


I would not bother with 1, since the goal is to remove the reference to a
font
directory on windows and use the font API of the OS.


But why implement retrieving the folder multiple times? It's the purpose of
the WinDirs unit after all and it can default to the newer API if it's
available.

By replacing it with a 'better' call, you lower the need for the switch to the 
font API.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to