'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Word '' This sample shows how to list fonts embedded in a DOCX.PublicClassListEmbedFontsFunctionCreateDocx() AsGcWordDocumentDim doc = NewGcWordDocument() doc.Load(Path.Combine("Resources", "WordDocs", "EmbedFonts.docx")) Dim embeddedFont = doc.Fonts.FirstOrDefault(Function(fi_) fi_.Embedded.Count > 1)?.Embedded(0) doc.Body.Paragraphs.Add("Embedded fonts found in this document:", doc.Styles(BuiltInStyleId.Heading1))Dim myListTemplate = doc.ListTemplates.Add(BuiltInListTemplateId.BulletDefault, "myListTemplate") ForEach fi In doc.FontsForEach ef In fi.EmbeddedDim p = doc.Body.Paragraphs.Add(doc.Styles(BuiltInStyleId.ListParagraph)) p.ListFormat.Template = myListTemplateDim run = p.GetRange().Runs.Add($"Found embedded font of type {ef.Type} in font ""{fi.Name}"".") run.Font.Name = fi.NameIf ef.Type = EmbeddedFontType.BoldThen run.Font.Bold = TrueElseIf ef.Type = EmbeddedFontType.ItalicThen run.Font.Italic = TrueElseIf ef.Type = EmbeddedFontType.BoldItalicThen run.Font.Bold = True run.Font.Italic = TrueEndIfNextNext Return docEndFunctionEndClass