I think you should use `object`, it is the equivalent of `struct` from C.
    
    
    type
      Vec2i = object
        x,y: int
      Vec2f = object
        x,y: float
      
      NVGglyphPosition = int32
      GlyphArray* = array[100,  NVGglyphPosition]
      TextBuffer* = object
        position        : Vec2f
        cursor          : Vec2i
        glyphPositions  : GlyphArray
        linePositions   : seq[Vec2i]
        text            : string
    

Reply via email to