Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var
Mask : integer;
Style : TFontStyle;
i : integer;
StyleSet : TFontStyles;
begin
// Set to integer <<<<<<<<<<
// Translate the set into a bit mask
Mask := 0;
for Style := Low(TFontStyle) to High(TFontStyle) do
if Style in Font.Style
then Mask := Mask or (1 shl Ord(Style));
MessageBox(0, PChar((IntToStr(Mask))), 'MASK', 0);
// Integer to set <<<<<<<<<<
// Translate the bit mask into a set
StyleSet := [];
for i := 0 to Ord(High(TFontStyle)) do
if Mask and (1 shl i) <> 0
then StyleSet := StyleSet + [TFontStyle(i)];
// Back check
if Font.Style = StyleSet
then MessageBox(0, 'Sets are equal', 'Check', 0)
else MessageBox(0, 'Sets are different', 'Check', 0);
end;