'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.Text '' This sample lists Unicode ranges available in each system font.publicclassUnicodeRangesFunctionCreatePDF(ByVal stream AsStream) AsInteger'' Setup:Dim doc = NewGcPdfDocument()Dim tl = NewTextLayout(72) With { .MaxWidth = doc.PageSize.Width, .MaxHeight = doc.PageSize.Height, .MarginAll = 72 } tl.DefaultFormat.FontSize = 7Dim tfH = NewTextFormat() With {.Font = StandardFonts.TimesBold, .FontSize = 12}Dim tfP = NewTextFormat() With {.Font = StandardFonts.Times, .FontSize = 11} '' Loop through all system fonts,'' list Unicode ranges provided by each font:ForEach font InFontCollection.SystemFonts tl.AppendLine($"{font.FontFileName} [{font.FullFontName}] [{font.FontFamilyName}]", tfH)Dim shot = font.CreateFontTables(TableTag.OS2) tl.AppendLine(shot.GetUnicodeRanges(), tfP) tl.AppendLine()Next '' Split and render TextLayout as shown in the PaginatedText sample:Dim tso = NewTextSplitOptions(tl) With { .MinLinesInFirstParagraph = 2, .MinLinesInLastParagraph = 2 } tl.PerformLayout(True)WhileTrueDim rest AsTextLayout = NothingDim SplitResult = tl.Split(tso, rest) doc.Pages.Add().Graphics.DrawTextLayout(tl, PointF.Empty)If SplitResult <> SplitResult.SplitThenExitWhileEndIf tl = restEndWhile'''' Done: doc.Save(stream)Return doc.Pages.CountEndFunctionEndClass