private LineBreakClass MapClass(CodePoint cp, LineBreakClass c)
        {
            // LB 1
            // ==========================================
            // Resolved Original    General_Category
            // ==========================================
            // AL       AI, SG, XX  Any
            // CM       SA          Only Mn or Mc
            // AL       SA          Any except Mn and Mc
            // NS       CJ          Any
            switch (c)
            {
            case LineBreakClass.AI:
            case LineBreakClass.SG:
            case LineBreakClass.XX:
                return(LineBreakClass.AL);

            case LineBreakClass.SA:
                UnicodeCategory category = CodePoint.GetGeneralCategory(cp);
                return((category is UnicodeCategory.NonSpacingMark or UnicodeCategory.SpacingCombiningMark)
                        ? LineBreakClass.CM
                        : LineBreakClass.AL);

            case LineBreakClass.CJ:
                return(LineBreakClass.NS);

            default:
                return(c);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JoiningClass"/> struct.
        /// </summary>
        /// <param name="codePoint">The codepoint.</param>
        public JoiningClass(CodePoint codePoint)
        {
            UnicodeCategory category = CodePoint.GetGeneralCategory(codePoint);
            uint            value    = UnicodeData.GetJoiningClass(codePoint.Value);

            this.JoiningType  = GetJoiningType(codePoint, value, category);
            this.JoiningGroup = (JoiningGroup)((value >> 16) & 0xFF);
        }