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 6104761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:52:43+00:00 2026-05-23T13:52:43+00:00

The cmap table in OpenType files translates a character code into a glyph ID.

  • 0

The cmap table in OpenType files translates a character code into a glyph ID.

Could any one help me to understand the C expression:

*(idRangeOffset[i]/2 + (c - startCount[i]) + &idRangeOffset[i])

Here is the Format 4 cmap subtable.

  • 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-05-23T13:52:44+00:00Added an answer on May 23, 2026 at 1:52 pm

    So, in that expression i = segment index and c = character code.
    idRangeOffset gets the offset of the segment into a glyphIdArray inside the cmap. The value you’re actually looking for in this case is glyphIdArray[something]. Since glyphIdArray immediately follows idRangeOffset in the font file, you use idRangeOffset as the base pointer.

    To get to the start of the glyphIdArray you need to add the idRangeOffset, but since that value is in bytes and the idRangeOffset table is 16bit, you need to divide by 2 to get the word count. You then get the offset of segment i inside the glyphIdArray.

    Your character’s offset however inside this segment is at c – startCount[i] so you need to add that as well.

    The final expression is a pointer so you need to dereference it to actually get the glyph’s index.

    This index is then used for the LOCA table.

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

Sidebar

Related Questions

Previously, I used to use MFC collection classes such CArray and CMap . After
Same for CMap, CList, and pretty much everything that uses templates (I guess). I
What is the similar function used for Cmap and Clist in iphone.. Can anyone
Here is the code that I have so far to define the icon: icon_bg
Using a Join and Component together in Fluent NHibernate Mapping throws Could not find
I know CMap::mergeArray in Yii merges two array. But I have three array and
I am following the documentation on apple.com . I managed to get The 'cmap'
This is PHP code I have so far: https://gist.github.com/2eeba2ff31ebecb526e2 This is the result: https://gist.github.com/cf07fe90922ac3dfcd22
I've got a trigger attached to a table. ALTER TRIGGER [dbo].[UpdateUniqueSubjectAfterInsertUpdate] ON [dbo].[Contents] AFTER
I'm trying to make a function that automatically adds an audit trail table when

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.