Updated comments in the FontHelper class to accurately refer to 'font families' rather than 'fonts'. The terminology was incorrect, leading to potential confusion; a 'font family' better and correctly describes the collections being returned by the functions.
In the FontHelper.cs file, the private static array variable '_fonts' was renamed to 'Fonts' for better code readability. This variable is used in the static constructor and methods to store and retrieve font families. These changes do not alter the functionality of the FontHelper class, its methods, or the code that uses it.
The FontHelper logic was incorrectly referencing Italic styles instead of Regular styles in its methods. Both `GetRegularAndBoldCapableFontFamilies` and `GetRegularOrBoldCapableFontFamilies` methods were corrected, ensuring the correct styles (Bold and Regular) are queried for in the font collection.
The font style parameters within the FontHelper class were changed from "Bold and Italic" and "Bold or Italic" to "Bold and Regular" and "Bold or Regular" respectively. This adjustment provides a more accurate representation of fonts supporting different styles.
Modified the FontHelper methods GetBoldAndItalicCapableFontFamilies and GetItalicOrBoldCapableFontFamilies in order to yield fonts that are capable of regular and bold styles, instead of just italic or bold. This change was made across multiple files where these methods are called. The adjustment allows for a greater range of fonts to be used, especially in instances where an italic style is not necessary or desired.
Updated the method names in FontHelper.cs and its references in multiple files for more accurate description of the returned object. Changed 'GetBoldAndItalicCapableFonts' and 'GetItalicOrBoldCapableFonts' to 'GetBoldAndItalicCapableFontFamilies' and 'GetItalicOrBoldCapableFontFamilies' respectively, as they are returning FontFamily objects not Font objects. This provides clearer understanding of the method's functionality to other developers.
This commit updates font fetching in many forms and logical parts of the app. Earlier, fonts were directly fetched using `FontFamily.Families`. However, this has been replaced with specific calls to methods of the `FontHelper` class. These methods like `GetAllSupportedFontFamilies()`, `GetItalicOrBoldCapableFonts()`, and `GetBoldAndItalicCapableFonts()` provide an easier and more clear selection of fonts based on specific needs. This makes the code more readable and manageable.