{"id":"runtime--Canvas.MeasureTextWidthStyled","name":"Canvas.MeasureTextWidthStyled","owner":"yeho","package":"runtime.Canvas","kind":"builtin","signature":"Canvas.MeasureTextWidthStyled(text text, int sizePercent, bool bold) -> int","description":"Measure text width styled through the Canvas runtime.","context":"Built into Yeho; no package import is needed. Native services require an admitted host and the correct resource lifecycle.","parameters":[{"name":"text","type":"text","description":"Supply text as text.","rule":"Text"},{"name":"sizePercent","type":"int","description":"Supply size percent as int.","rule":"AnyInteger"},{"name":"bold","type":"bool","description":"Supply bold as bool.","rule":"Bool"}],"returns":"int","members":[],"tags":["builtin","canvas","cpu","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"src/compiler/common/intrinsic_registry.cpp","line":1636,"sha256":"14d29529d2d3c0e2b587f83c7f125b99ada142ed7ae28612701ea6cb9174ac65"},"status":"registered-intrinsic","notes":["The example checks the call shape. Opening windows, recording audio, changing files, network operations, and process operations have real effects when run. Follow the corresponding package lifecycle before using live resources."],"examples":[{"id":"usage","title":"Call Canvas.MeasureTextWidthStyled","description":"A complete typed caller with illustrative arguments. Native operations need the corresponding host and resources.","code":"text text = \"text\"\nint sizePercent = 1\nbool bold = true\nint result = Canvas.MeasureTextWidthStyled(text, sizePercent, bold)\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.runtime__canvas_measuretextwidthstyled\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu","builtin"],"run":"cpu-oracle","verification":"type checked","sha256":"8181d1e960d18248f3ace80888233b5f65d3cd3f929098bdd351b465c0b03f4b","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=runtime--Canvas.MeasureTextWidthStyled","json":"https://demonhunterlabs.com/reference/items/runtime--Canvas.MeasureTextWidthStyled.json","markdown":"https://demonhunterlabs.com/reference/text/runtime--Canvas.MeasureTextWidthStyled.md"}
