Hi Martin,

Currently, FA icon height can be set in tftglyphs constructor. Height
property is read-only. Is it possible to change it to write too? I'm trying
to override stock glyphs with FontAwesome at runtime, so they fit to my app
needs and have nice antialiasing. Also, with bmo_colormask option I can
change their color at runtime without any quality loss (user has color
scheme creator), with MSE buildin glyphs and bmo_graymask I got weird
artifacts (and icons disappear) after call timagelist.bitmap.init(AColor),
it is very probably related to issues with my Intel HD 530 on Kubuntu, I
don't want back to it :).
Anyway, so I'm doing this:

  // Stock 15px
  stockobjects.glyphs.clear;
  stockobjects.glyphs.options := [bmo_masked,bmo_colormask];
  glyphs:= tftglyphs.create('FontAwesome.otf',0,15);
  b := tbitmapcomp.create(nil);
  try
    b.bitmap.masked := True;
    b.bitmap.colormask := True;
    l := stockobjects.glyphs;
    _Add(61534,cl_default); // stg_none
    _Add(61452,cl_default); // stg_checked
    _Add(61713,cl_default); // stg_checkedradio
    _Add(61590,cl_default); // stg_box
    _Add(61767,cl_default); // stg_boxexpanded
    _Add(61846,cl_default); // stg_boxexpand
    _Add(61658,cl_default); // stg_arrowright
    _Add(61656,cl_default); // stg_arrowup
    _Add(61657,cl_default); // stg_arrowleft
    _Add(61655,cl_default); // stg_arrowdown
    ...
    ...
  finally
    glyphs.free();
    b.Free;
  end;

Problem is that stock imagelist size is 15x15 but not all icons have to be
this fixed size, for example circle for stg_checkedradio has to be much
smaller - arround 10px, same for arrows for scrollbars and so on. For such
"jump" between sizes I have to free tftglyphs instance and create it again
with new height and all initializations. Hawing writable Height make it
much easier and faster.

Regards
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to