feat: promote font force heat flux and integer set properties
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

This commit is contained in:
2026-08-17 09:10:47 -04:00
parent d11566403d
commit 8f6053089a
159 changed files with 9687 additions and 163 deletions

View File

@@ -0,0 +1,49 @@
import json
import FreeCAD as App
FREECAD_COMMIT = "0108fd4b4850cc46e625b60e53cea7a7bbe69f8d"
def snapshot(document, obj, requested):
recompute_result = bool(document.recompute())
return {
"requested": requested,
"value": str(obj.Font),
"propertyTypeId": obj.getTypeIdOfProperty("Font"),
"propertyStatus": [str(item) for item in obj.getPropertyStatus("Font")],
"editorMode": [str(item) for item in obj.getEditorMode("Font")],
"objectState": [str(item) for item in obj.State],
"statusString": str(obj.getStatusString()),
"recomputeResult": recompute_result,
"hasShapeProperty": "Shape" in obj.PropertiesList,
"objectSet": [{"name": candidate.Name, "typeId": candidate.TypeId} for candidate in document.Objects],
}
def run():
document = App.newDocument("PropertyFontSuccess")
try:
obj = document.addObject("TechDraw::DrawViewAnnotation", "FontProbe")
phases = {"default": snapshot(document, obj, "osifont")}
for phase, value in [("named-family", "DejaVu Sans"), ("unicode-family", "Noto Sans CJK SC"), ("empty-family", ""), ("restored", "osifont")]:
obj.Font = value
phases[phase] = snapshot(document, obj, value)
return {
"schemaVersion": 1,
"status": "pass",
"baselineId": "freecad-1.1.1-property-font-success",
"freecadVersion": ".".join(str(value) for value in App.Version()[:3]),
"gitCommit": FREECAD_COMMIT,
"propertyType": "App::PropertyFont",
"object": {"name": obj.Name, "typeId": obj.TypeId},
"property": {"name": "Font", "typeId": obj.getTypeIdOfProperty("Font"), "group": obj.getGroupOfProperty("Font")},
"phases": phases,
"diagnostics": {"exception": None, "documentObjectCount": len(document.Objects)},
}
finally:
App.closeDocument(document.Name)
print("FREECAD_PROPERTY_FONT_SUCCESS_RESULT=" + json.dumps(run(), sort_keys=True))