I wanna know there is way to separate fonts by type
for example : i wanna load all arabic fonts to a combobox only
You could enumerate the fonts you want using the EnumFontFamiliesEx API call. Specify ARABIC_CHARSET as the character set in the LogFont you supply to the routine, and have your callback routine add the font names to your combo box.
I don't have any VB code to do that but maybe this Delphi code will get you started. It should be easy enough to convert to VB.
function FontEnumerator( const EnumLogFontEx: TEnumLogFontEx; const NewTextMetricEx: PNewTextMetricEx; FontType: Integer; Strings: TStrings): Integer; stdcall; const CONTINUE_ENUMERATION = 1; // Any non-zero value will do begin Strings.Add(EnumLogFontEx.elfFullName); Result := CONTINUE_ENUMERATION; end; procedure GetArabicFonts(FontNames : TStrings); var DC : THandle; LogFont : TLogFont; begin DC := GetDC(GetDesktopWindow); // We will list the fonts available in desktop window's device context if DC <> 0 then try FillChar(LogFont, SizeOf(LogFont), 0); // Initialise spec of fonts we want to include all fints LogFont.lfCharSet := ARABIC_CHARSET; // Then narrow it down to just Arabic fonts EnumFontFamiliesEx(DC, LogFont, @FontEnumerator, lParam(FontNames), 0); // List the fonts finally ReleaseDC(GetDesktopWindow, DC) end end; procedure TForm1.FormCreate(Sender: TObject); begin GetArabicFonts(ComboBox1.Items); end;
i am using visual studio 2015 and trying to export data which i am importing through excel by the user selected Excel file. Now the importing part has been successfully completed i am using OLEDB Connection but Stuck in exporting the same data to a new Excel file. tried ...
I am creating a program that when you print an author, you must show all the information of all the books that the author has written. Add a new attribute in the Author class that will be "BooksWriting: List (Book)".
I have expanded the program so that it also ...
I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using ...