.examples

git-svn-id: svn://ultimatepp.org/upp/trunk@14161 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-03-12 22:22:08 +00:00
parent 22cb75a720
commit 19314369c0

View file

@ -20,7 +20,20 @@ TextToSvgPathDlg::TextToSvgPathDlg()
for(int i = Font::COURIER + 1; i < Font::GetFaceCount(); i++)
if(Font::GetFaceInfo(i) & Font::SCALEABLE)
face.Add(i);
SetupFaceList(face);
struct DisplayFace : public Display {
void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const {
int ii = q;
Font fnt = StdFont();
if(!(Font::GetFaceInfo(ii) & Font::SPECIAL))
fnt.Face(ii);
w.DrawRect(r, paper);
w.DrawText(r.left, r.top + (r.Height() - fnt.Info().GetHeight()) / 2,
Font::GetFaceName((int)q), fnt, ink);
}
};
face.SetDisplay(Single<DisplayFace>());
face <<= Font::ARIAL;
height.MinMax(6, 500);