Beispiel #1
0
 internal static CMapToUnicode GetToUnicodeFromUniMap(String uniMap)
 {
     if (uniMap == null)
     {
         return(null);
     }
     lock (uniMaps) {
         if (uniMaps.Contains(uniMap))
         {
             return(uniMaps.Get(uniMap));
         }
         CMapToUnicode toUnicode;
         if (PdfEncodings.IDENTITY_H.Equals(uniMap))
         {
             toUnicode = CMapToUnicode.GetIdentity();
         }
         else
         {
             CMapUniCid uni = FontCache.GetUni2CidCmap(uniMap);
             if (uni == null)
             {
                 return(null);
             }
             toUnicode = uni.ExportToUnicode();
         }
         uniMaps[uniMap] = toUnicode;
         return(toUnicode);
     }
 }