Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- types.nim:
- var n22*: Engine22Manager
- proc en*(): var Engine22Manager {.inline.} = n22 # accessor for engine singleton - artifact from an earlier time when I
- # barely knew Nim/was trying to get hot patching dlls working, (pre arc)
- --------------------------
- fontManager.nim: [Version throwing unhandled exception: index 1 not in 0 .. 0 [IndexDefect]]
- proc getFont*(fontName: string, size: int, fontMgr: FontManager): E22Font {.inline} =
- let indexName = fontName & "_" & $size
- if en().fm.fontIndices.hasKey(indexName):
- return en().fm.fonts[en().fm.fontIndices[indexName]]
- else: ...
- --------------------------
- fontManager.nim: [Version now working]
- proc getFont*(fontName: string, size: int): E22Font {.inline} =
- let indexName = fontName & "_" & $size
- if n22.fm.fontIndices.hasKey(indexName):
- return n22.fm.fonts[n22.fm.fontIndices[indexName]]
- else: ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement