Giter Club home page Giter Club logo

etheadev / iconfontsimagelist Goto Github PK

View Code? Open in Web Editor NEW
211.0 211.0 55.0 32.77 MB

Four advanced components to simplify use of Icon Fonts as images and ImageList: TIconFontImage, TIconFontsImageCollection, TIconFontsVirtualImageList, TIconFontsImageList (for VCL and FMX). Full support for High-DPI apps. Rendering optimized with GDI+

License: Apache License 2.0

Pascal 100.00%
delphi demo fmx fonts gdi-plus icons icons-pack manage-icon-fonts material-icon-fonts material-ui vcl vcl-styles

iconfontsimagelist's People

Contributors

andrea-magni avatar carlobarazzetta avatar edwinyzh avatar lminuti avatar muminjonguru avatar nictambethea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iconfontsimagelist's Issues

Add support for fonts with variable width characters .

I am using several icon fonts where some characters are wider than others. (Just like a W is wider than an I) The IconFontImageList components seem to assume all characters are the same width.

For each character there should be options to change the width to allow for these wider characters.

The icons that are stored in IconFontList are static?

After loading multiple IconsFont into the list at design time...
Do the icons remain as iamges within the list? ... or only pointers / references to certain Fonts.

Basically the question is:
When I run "my program" on the target PC, do the images persist even though the "Material Font" is not installed?

Best regards,

What happens if the font is updated on the end user's computer in a non-backward compatible way?

As I understand it, IconFontsImageList uses the font installed on the end user's system to render the icon. Image this situation - today my program built with IconFontsImageList is deployed to the end user's system, 3 years later without updating the program, the user's system has a new version of Material Design Icons Desktop.ttf updated, is it possible that the icon rendering no longer works?

If yes, how to prevent that? Is it possible for us to use a standalone font installed in our EXE's folder like a standalone DLL?

Thanks!

Them

After applying them and return to window them font color is black

Listen for WM_FONTCHANGE

When having the editor open and installing fonts into the system the list of available fonts doesn't get updated.

You should handle WM_FONTCHANGE and refresh the font list whenever the message is received.

That would be much easier than having to exit and re-enter the editor.

ModernAppDemo not run

The application not compile. Message error:
[dcc32 Error] E1026 File not found: 'AwesomeFont.RES'

Desktop:

  • OS: Windows
  • Version 10

Ver 2.2.2. - New features

Marco,
Today I'm upset, but I really want to help...

On the home page, it reads: "We recommend that TIconFontsVirtualImageList be used only for Delphi versions prior to 10.3 ....", but the DEMO 10.3 uses it.

What is better in the future?
If TIconFontsVirtualImageList tends to disappear, better to start with the native component TVirtualImageList.
Don't you think?

Another point says: "Don't forget also the importance of PreserveItems ...."
Where is this option?
It is not among the TIconFontsImageList component properties; or in TIconFontsImageCollection; or in TIconFontsVirtualImageList ...?

Segmentation Fault in Android

I can't really (yet) give you a way to duplicate the problem.

I only see this issue in Android, mostly in Android 11

I'm using IconFontImageList extensively in my Android App. I see the issue when I change tabs using
TabControl.SetActiveTabWithTransitionAsync(ActiveTab,TTabTransition.Slide, Direction, AfterOpen);

And the page I am tabbing from has a lot of images on them.

Basically I'm just getting a Segmentation Fault on what appears to be a memory move.

I've attached a screenshot of the call stack. I will try to reproduce this in a smaller app but I am posting this in case this is an issue you are already familiar with.

image

[performance tip, not an issue] use `StopDrawing' and `BeginUpdate/EndUpdate` to greatly improve the performance

So IconFontsImageList is such a great great library. Thanks!

Here is a tip (not a bug report nor question) for newcomers who create icons at runtime - Use StopDrawing(True)/StopDrawing(False) and BeginUpdate/EndUpdate (especially the former), the icon creation speed will be improved dramatically.

Your code would look like:

  aImgList.StopDrawing(True);
  aImgList.BeginUpdate;
  try
    for i := 0 to 999 do
      aImgList.AddIcon(...);
  finally
    aImgList.EndUpdate;
    aImgList.StopDrawing(False);
    aImgList.RedrawImages;
  end;

package 'dclfmxstd' not found

Describe the bug
Hi, when i Try to compile All your component on D 10.3.2 i obtain this error msg:
[dcc32 Fatal Error] dclIconFontsImageListFMX.dpk(36): E2202 Required package 'dclfmxstd' not found
I can risolve this error ?
Thanks

Desktop (please complete the following information):

  • OS: W10
  • Browser Chrome

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Images not exported

In version 2.2.2, the "Export" option from de Editor, only export icon named.

My IconList have 250 icons, but only 43 were exported.
More, the "first" imege export has named ".png" , no name, only extension.
This image is the last image in the list.
I have no more data to provide ...

In addition to the icon names ...
Using the "Custom Charmap", it is possible select icons (preloaded from the "xxxDesktop.ttf" font).
The preload, retrieves the names of the icons and their Hex value.

When an icon is selected (copied) to the IconFontsList, the Hex value is retrieved, but not the name.

It is not important, it is just a visual matter.... but...
If to export a name is required, then if it becomes something important.
Another possibility is that, when exporting images, if the icon does not have a name, its position Idx is assigned as a name, like "idx_1.png"; "or "365.png"
it's an idea...

Installation: File not found: 'FMX.IconFontsImageListEditorUnit.fmx'

Unable to install dclIconFontsImageListFMX_10_3.bpl because FMX.IconFontsImageListEditorUnit.fmx' is missing

To Reproduce
Attempt to install dclIconFontsImageListFMX_10_3.bpl after building IconFontsImageListFMX_10_3.bpl

Expected behavior
Package would be installed

Using Delphi 10.3
Windows 10

Enable the nice GDI+ drawing for XE4+

First, I really appreciate your great work! It's really useful for our Delphi developers to make our software to adapt HD screenshots available everywhere!

According to the GDI/GDI+ wiki page, you enable GDI+ drawing for XE6+, but actually at least XE4 already support GDI+

I've made the changes (very little) and successfully compiled it. I'm about to make a PR, but due to national network issue here, I'll have to do it a little later.

Ghost component :-D

Hi...
In new DEMO 2.3, have a next line on Form Create method:
FIconFontsVirtualImageListHot := TIconFontsVirtualImageList.Create(Self)
which is dynamically created, but then doesn't seem to be used/assigned in any component/process.

Anyway, the TopToolBar component, still shows the "Hot" effect.

So, it is no longer necessary to use a second component in runtime?

Some font is drawn incorrectly.

Hi. Thanks for your work, it was great, and solved some my problem.
There is some fixes... Some fonts other than Material Design and Segoe MDL2 drawn incorrectly. How to fix it.
Untitled

Some icons are not shown

I've encounter several icons that couldn't be displayed correctly by the image list, and today I encountered another: F15AB: list-status, as shown in the attached screenshot.

Please advise how to solve it.

Love this excellent lib, BTW :)

some material desktop icons not shown

The 'Font "Material Design Icons Desktop" is not installed' issue

This might/might not an issue of IconFontsImageList, however, it's relevant so at least worth a discussion here and thus benefit all others that might encounter the same issue.

I use Inno Setup to install the font for the end users, the code is a variant of the following:
Source: D:\Project1\Fonts\Material Design Icons Desktop.ttf; DestDir: {fonts}; FontInstall: Material Design Icons Desktop; Flags: uninsneveruninstall onlyifdoesntexist

I believe the font installed correctly on most of the computers, but it seems to be failed on some of them because my program that uses the font reported the issue stated in the title.

Have you encountered this and do you have any idea? Thanks!

Don't auto-switch to dark mode

Hello friends,
First step: sorry for my poor English.

I am upgrading the component from 2.3 to 3.3.1 version.

But this version, activates an "Auto-Switch" to dark mode if my IDE is also dark mode.
In this mode, the icons (all in clBlcak color) are blurred or at least not displayed comfortably.

So...
How to change or disable that auto-switch and go back to clear mode (an original)?

Certainly, the IDE will remain dark, but the Editor needs to remain in light (normal) mode.

Best regard,
Yako

Save icon

  1. trying to understand how a number result in an icon - ok i got it
  2. It would have been nice if you can SAVE an icon as a png or bmp to a directory
    3 the max is 2990 ?

Glyph image (TBitBtn)

So, TButton have an "Images" property to get the images, but TBitBtn only have the "Glyph" property.

What is the way to add an icon from the TIconFontsImagesList to the "Glyph" property?

Best regards,

Update library

Sorry... how update pre-installed library?
Uninstall "Components" and then compile again in same path?

Issues when font is installed runtime

Describe the bug
This is a crosspost from https://en.delphipraxis.net/topic/3377-looking-for-icon-fonts-support-in-delphi-for-high-dpi-and-themed-app

If the font is not installed on the developer machine, launching the VCL demo (from within the IDE or starting the compiled .EXE) for the first time icons do not show up:

image

The demo does not unregister the font upon closing, so at the second launch everything behaves normally.

I can confirm that AddFontResource works, as calling Screen.ResetFonts and re-evaluating them by calling Screen.Fonts before and after the WinApi call the font shows up in the list.

To Reproduce

  1. Make sure font is not installed on the machine
  2. Start the VCL demo from the IDE or by launching the compiled .EXE file

Desktop (please complete the following information):

  • OS: Win10 21H1 x64
  • Delphi 10.4.2
  • Latest source downloaded from this Git repository

difficult to understand how to use it

Hi
The documentation lacks.
I tried to do what seems to be a simple task:
I have an action list and I want to assign icons to those actions.
This controls seemed to be what I need but I cannot figure out how to use it.

For example, I see a certain Unicode chat that I want to use. But I cannot add it to the imagelist.

Empty SaveToFile

Hi,
Metohod IconFontsImageList.SaveToFile('list.bmp'); create a empty image.

IconFontsImageList.SaveToFile('list.bmp'); create a empty BMP file.
IconFontsImageList.SaveToFile('list.png'); create a empty PNG file.

How to strore / reload a icon's list into a image file?


Delphi XE 10.3
Windows 10

Move/import images

Hi friends,
How move images from TIconFontsImageList to new TIconFontsImageCollection?

[RAD Studio 20.3] Unexpected memory leak warning after run demo project

Describe the bug
When you run the demo project through the Delphi IDE, and after changing the UI theme, an unexpected memory leak message appears.

To Reproduce
Steps to reproduce the behavior:

  1. Open the demo project in Delphi IDE (in my case, RAD Studio 10.3)
  2. Change the theme for different options '....'
  3. Close the UI

Expected behavior
The unexpected memory leak message appears before the application is terminated.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 Professional
  • RAD Studio 10.3
  • Intel I3 Processor / 4GB RAM / 120 SSD HD

TIconFontImageList + TIconFontImage VCL style support

Is your feature request related to a problem? Please describe.
I have a TIconFontImageList with a TIconFontImage linked to it. With the default Windows style all appears correctly but if a different VCL style is selected the background of the image stays white. This results a completely white image on dark themes as the font color is usually white as well.

Describe the solution you'd like
TIconFontImage / TIconFontImageList would consider the background of the picture, allowing a "transparent" look (like on menu items, pagecontrol tabs, buttons, etc.)

Describe alternatives you've considered
As a workaround, a normal image can be used:

 bmp := TBitMap.Create;
 Try
   bmp.Width := MyImage.ImageList.Width;
   bmp.Height := MyImage.ImageList.Height;
   If TStyleManager.ActiveStyle = TStyleManager.SystemStyle Then
     bmp.Canvas.Brush.Color := clWindow
   Else
     bmp.Canvas.Brush.Color := TStyleManager.ActiveStyle.GetStyleColor(scWindow);
   bmp.Canvas.FillRect(Rect(0, 0, bmp.Width, bmp.Height));
   MyImage.ImageList.GetBitmap(MyImage.ImageIndex, bmp);
 Finally
   FreeAndNil(bmp);
 End;

Additional context
On the left is a TIconFontImage linked to a TIconFontImageList. On the right is a normal TImage with the above workaround:

System (no) theme:
image

Carbon:
image

Ver 2.2.2 compile error

In version 2.2.2, don't compile...
Message error is:
[dcc64 Error] IconFontsImageListBase.pas(745): E2003 Undeclared identifier: 'SaveToPngFiles'

function TIconFontsImageListBase.SaveToPngFiles(const AOutFolder: string): Integer;
begin
{$IFDEF UNICODE}
Result := IconFontsUtils.SaveToPngFiles(Self, AOutFolder); ///<<<<< error line
{$ELSE}
Result := 0;
{$ENDIF}
end;


Delphi VCL 10.3
Win 10

Re-install

Hi Carlo, sorry....
First;
In the Wiki dont see...
how un-install old library and re-install new package?

Second;
what is the difference between web and desktop fonts TTF files?

Third;
do I need to have both TTF fonts installed to program code?
in my clients, I have only installed "xxDesktop.ttf" because I only need the images contained there....

As usual, thanks for your kind answers.
-YAKO-

Glyph in TBitBtn

So, TButton have an "Images" property to get the images, but TBitBtn only have the "Glyph" property.

What is the way to add an icon from the TIconFontsImagesList to the "Glyph" property?

Best regards,

Error compiling FMX design time package with 10.3

Hi Carlo, we just tried to install IconFontImageList on a 10.3 Delphi installation but it fails with the following error:

[dcc32 Fatal Error] dclIconFontsImageListFMX.dpk(36): E2202 Required package 'dclfmxstd' not found

We are addressing VCL application at the moment so we just skipped it but zou may be interested in fixing this nonetheless.
Thanks

ERRORE APPLY BUTTON

Nella modifica delle caratteristiche delle icone, l’editor integrato mi segnala " ACCESS VIOLATION " se clicco sul tasto APPLY.
Uso windows 10 build 2004 e Delphi 10.3 comunity edition.
Enrico Pilotto
errore1

[Question]No need to use TVirtualImageList since we can already set the size of TIconFontsImageList?

I noticed the recent addition of TVirtualImageList. If I understand it correctly, the only purpose of TVirtualImageList is to produce variant sizes of icon. But since we can already change the width/height of TIconFontsImageList and it will regenerate the bitmap of the new size, and this is already really well in my project. I think there is no need to use TVirtualImageList at all?

Please correct me if I'm wrong.

Icons are trimmed

ice_screenshot_20200516-162540
ice_screenshot_20200516-162621

Icon 'download' from FontAwesome is trimmed.
It does not appear fully in Icon Fonts ImageList Editor.
Also does not apper fully in delphi project.
Same with icon 'upload' and many others.

Congratulation for this nice utility.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser FireFox
  • Version 76.0.1

Multi size icons or Small/Large icons

Hi,
Sorry for my poor english.

We have 24px or 32px icon images for the toolbar buttons, but only 16px for the MenuBar or PopMenu.
So, we have 2 IconFontsImageList, one for 32px icons and other for 16px.

First, load in DESIGN mode (manyually by CharMap tool) the 32px IconFontsImageList.
Next, in RUNTIME mode, fill a second IconFontsImageList for 16px icons like this:

IconFontsImageList16.Clear;
IconFontsImageList16.Assign( IconFontsImageList 32 );

But, this forces us to duplicate the component.
Perhaps if 2 new properties were included, such as SamallIconSize=nn and LargeIconSize=nn in the same IconFontsImageList its a solution,

any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.