MCPcopy Index your code
hub / github.com/SplootCode/splootcode / stringWidth

Function stringWidth

packages/editor/src/layout/layout_constants.ts:49–51  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

47}
48
49export function stringWidth(s: string) {
50 return getTextWidth(s, "16px 'Karla'")
51}
52
53export function stringLiteralDimensions(s: string): [number, number] {
54 const lines = s.split('\n')

Callers 6

getInsertBoxWidthFunction · 0.90
calculateDimensionsMethod · 0.90
EditBoxClass · 0.90
InsertBoxClass · 0.90
renderMethod · 0.90
preloadFontsFunction · 0.85

Calls 1

getTextWidthFunction · 0.85

Tested by

no test coverage detected