protected override void CalculateExtents() { var aabb = new Bnd_Box2d(); aabb.Add(Pnt2d.Origin); aabb.Add(DrawingRenderHelper.MeasureText(Text, Style).ToPnt()); Extents = aabb; }
public void TextWithUnicode() { Drawing drawing = new(); drawing.Add(new TextElement("κόσμε", DrawingRenderHelper.GetDefaultFontStyle())); var pdf = PdfDrawingExporter.Export(drawing); Assert.IsNotNull(pdf); // Write to file and compare AssertHelper.IsSameTextFile(Path.Combine(_BasePath, "TextWithUnicode.pdf"), pdf, AssertHelper.TextCompareFlags.IgnoreFloatPrecision); }