Method TryLoad
- Namespace
- BitMiracle.Docotic.Pdf.Gdi
- Assembly
- BitMiracle.Docotic.Pdf.Gdi.dll
TryLoad(string, bool, bool, Stream)
Attempts to load font bytes from the operating system using GDI+ and the Font class.
public bool TryLoad(string familyName, bool bold, bool italic, Stream stream)
Parameters
familyNamestringFamily name of the font to load.
boldboolSet to
truefor the bold font weight.italicboolSet to
truefor the italic font style.streamStreamThe stream to put font bytes to.
Returns
- bool
trueif the eligible font bytes were successfully saved tostream; otherwise,false.
Exceptions
- ArgumentNullException
familyNameorstreamisnull.