Yes. I put it though externc.

Here’s the ActionScript output for the method:
    /**
     * Convert the given text to a list of Glyph objects.
     * Note that there is no strict one-to-one mapping between characters and
     * glyphs, so the list of returned glyphs can be larger or smaller than the
     * length of the given string.
     *
     * @param s [string] 
     * @see [opentype]
     * @returns {(null|opentype.Glyph)} ]}
     */
    public function stringToGlyphs(s:String):opentype.Glyph {  return null; }

That definitely looks wrong.

I’m not sure what it’s supposed to do. Unless we introduce Typed Arrays, 
probably just converting it to a simple Array is the safest way to go. I don’t 
think Vector will translate very well.

> On Feb 26, 2017, at 6:36 PM, Alex Harui <aha...@adobe.com> wrote:
> 
> 
> 
> On 2/25/17, 11:42 PM, "Harbs" <harbs.li...@gmail.com 
> <mailto:harbs.li...@gmail.com>> wrote:
> 
>> I have the following in an extern:
>> 
>> /**
>> * Convert the given text to a list of Glyph objects.
>> * Note that there is no strict one-to-one mapping between characters and
>> * glyphs, so the list of returned glyphs can be larger or smaller than
>> the
>> * length of the given string.
>> * @param  {string} s
>> * @param  {Object=} options
>> * @return {opentype.Glyph[]}
>> */
>> opentype.Font.prototype.stringToGlyphs = function(s, options) {};
>> 
>> The function returns an array of opentype.Glyph objects.
>> 
>> When I try compile a call to this function, I get the following error (in
>> compc):
>> "Implicit coercion of a value of type Glyph to an unrelated type Array."
>> 
>> This seems to me like it’s probably a bug.
> 
> I'm guessing you first put this code throughout externc?  What is the .as
> output?  Has externc handled other typed arrays correctly? Is it supposed
> to convert it to a Vector?
> 
> -Alex

Reply via email to