Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8462119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:04:51+00:00 2026-06-10T14:04:51+00:00

I’ve compiled freetype 2.4.2 on android and any time I try to use FT_Set_Char_Size()

  • 0

I’ve compiled freetype 2.4.2 on android and any time I try to use FT_Set_Char_Size() it will crash in the ftobjs.c file in the FT_Request_Size() function at this line

error = clazz->request_size( face->size, req );    //line 2832

My code works perfectly fine on Windows, Linux, Mac, IPhone and IPad. But here is the deal.
I was having the exact same issue, same crash at the same spot on Windows (vc++) until I compiled freetype with /Za “Disable Language Extensions”.

So I’m pretty sure it’s how freetype is being compiled on Android that is causing the crash.
I’ve looked up how to Disable Language Extensions on android with no avail.

here is my Android.mk file for freetype

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_C_INCLUDES += \
    $(LOCAL_PATH)/builds \
    $(LOCAL_PATH)/include

LOCAL_SRC_FILES:= \
    src/base/ftbbox.c \
    src/base/ftbitmap.c \
    src/base/ftglyph.c \
    src/base/ftstroke.c \
    src/base/ftxf86.c \
    src/base/ftbase.c \
    src/base/ftsystem.c \
    src/base/ftinit.c \
    src/base/ftgasp.c \
    src/raster/raster.c \
    src/sfnt/sfnt.c \
    src/smooth/smooth.c \
    src/autofit/autofit.c \
    src/truetype/truetype.c \
    src/cff/cff.c \
    src/psnames/psnames.c \
    src/pshinter/pshinter.c \
    src/type1/type1.c \
    src/cid/type1cid.c \
    src/pfr/pfr.c \
    src/type42/type42.c \
    src/winfonts/winfnt.c \
    src/pcf/pcf.c \
    src/psaux/psaux.c \
    src/bdf/bdf.c \
    src/gzip/ftgzip.c \
    src/lzw/ftlzw.c

LOCAL_CFLAGS += -DFT2_BUILD_LIBRARY
LOCAL_MODULE := freetype
LOCAL_LDLIBS := -ldl -llog

include $(BUILD_STATIC_LIBRARY)

My full project can be found here

    http://digitalknob.googlecode.com

It compiles fine and I get no errors. Just the crash when I use FT_Set_Char_Size(). Driving me crazy for a few days now 😛 Any help is so greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:04:52+00:00Added an answer on June 10, 2026 at 2:04 pm

    Here is the answer. It turns out the problem the whole time was loading the font file out of the .apk file since it is technically compressed. With SDL, We use SDL_RWops to load the font file within the assets folder of the .apk file. We load the font file into OpenGLES using ftgles. Full example can be found at http://www.digitalknob.com

    SDL_RWops *file = SDL_RWFromFile(filename, "rb"); 
    
    unsigned long fileLen; 
    SDL_RWseek(file,0,SEEK_END); 
    fileLen=SDL_RWtell(file); 
    SDL_RWseek(file,0,SEEK_SET); 
    
    //Allocate memory 
    buffer=(unsigned char *)malloc(fileLen+1); 
    if (!buffer){ 
       printf("Memory error!\n"); 
       SDL_RWclose(file); 
       return; 
    } 
    
    //Read file contents into buffer 
    SDL_RWread(file, buffer, fileLen, 1); 
    SDL_RWclose(file); 
    
    texture_font = new FTGLTextureFont(buffer, fileLen); 
    texture_font->FaceSize(18); 
    
    //don't forget to free your buffer later.
    //free(buffer);
    

    If your not using SDL, you’ll need zlib or something to access the font file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I need a function that will clean a strings' special characters. I do NOT
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.