Skip to content

get_font_face compile error #6

@bird1079s

Description

@bird1079s

Error in cairo_tst.cr:42: instantiating 'Cairo::Context#font_face()'

ff = context.font_face
^~~~~~~~~

in lib/cairo/src/cairo/context.cr:472: wrong number of arguments for 'Cairo::C::LibCairo#get_font_face' (given 2, expected 1)

  LibCairo.get_font_face(@cairo, font_face.to_unsafe)
           ^~~~~~~~~~~~~

Fix

def font_face : FontFace
  #font_face = FontFace.new
  #LibCairo.get_font_face(@cairo, font_face.to_unsafe)
  #font_face
  font_face = LibCairo.get_font_face(@cairo)
  FontFace.new(font_face)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions