String html="<div style=\"font-size: 142.222667px; font-weight: 400; text-align: start; font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; color: rgba(0, 0, 0, 0.85); transform: matrix(1, 0, 0, 1, 500.276, 28.2664);\"><p style=\"text-align:left;\"><span style=\"color:#FFFFFF;font-size: 142.222227px;font-family:Agency FB;\">2023</span></p></div>";
Presentation presentation = new Presentation();
SlideCollection slides = presentation.getSlides();
ISlide iSlide = slides.get(0);
IAutoShape iAutoShape = iSlide.getShapes().appendShape(ShapeType.RECTANGLE, new Rectangle(50, 50, 200, 200));
iAutoShape.getTextFrame().getParagraphs().addFromHtml(html);
// 上面的html 代码中2023 的字体为Agency FB 变成shape后 字体为Agency
System.out.println(iAutoShape.getTextFrame().getParagraphs().get(1).getTextRanges().get(0).getText());
System.out.println(iAutoShape.getTextFrame().getParagraphs().get(1).getTextRanges().get(0).getLatinFont().getFontName());
// spire version 7.12.0