getGlyphsInRange doesn't return the output argument.

Issue #188 resolved
Bahman Eslami
created an issue


Generally I can pass None as the output arguments and then I will get the output argument in return, but for some reason getGlyphs function from NSLayoutManager doesn't return the output arguments. Here is the syntax in Objective c:

NSInteger numGlyphs = [layoutManager numberOfGlyphs];
NSGlyph *glyphs = (NSGlyph *)malloc(sizeof(NSGlyph) * (numGlyphs + 1)); 
[layoutManager getGlyphs:glyphs range:NSMakeRange(0, numGlyphs)];
[textStorage removeLayoutManager:layoutManager];

The glyphs is an array of NSGlyphs as an output argument which is passed as a pointer. I got the following method to work in python:

layoutManager.getGlyphsInRange_glyphs_properties_characterIndexes_bidiLevels_ (glyphsRange, None, None, None, None)

But I don’t get the glyph buffer in return instead I get only one value which is described as number of glyphs in buffer on Apple website, so maybe that's the reason the output arguments are not returned here. Is this not covered yet or there is a solution I'm not aware of?


Comments (3)

  1. Log in to comment