Learn about the pascal type "set", e.g.
https://wiki.freepascal.org/SetA set is a combination of several elements. In case of the font styles, the elements are fsBold, fsItalic, fsUnderline and fsStrikeout; they are defined in an enumeration TFontStyle (singular!) = (fsBold, fsItalic, fsUnderline, fsStrikeout). Conversely to this there is the set type TFontStyles (plural) = set of TFontStyle, it contains the some or all TFontstyle elements, or even none ("empty set"). The elements in the set are enclosed by square parenthesis: [fsBold, fsItalic] means that the font is bold and italic, [fsBold] means that it is bold only, [] is the empty set, and this means that the font is neither bold, nor italic, nor underlined, not striked-out. To check whether an element is included in the set we have the "in" operator: Assume that "FontStyle" is a set variable of the TFontStyles type. Then the expression "(fsBold in FontStyle)" is true when the font is bold, or "not (fsBold in FontStyle)" is true when the font is not bold. Checking for multiple elements can be done by several "in" calls: "(fsBold in FontStyle) or (fsItalic in FontStyle)" = font is either bold or italic, or by a "multiplication" expression: "[fsBold, fsItalic] * FontStyle <> []" - the intersection between the set [fsBold, fsItalic] and FontStyle is not empty, i.e. the FontStyle is either bold or italic. I hope you remember some elemental maths...