855 const char* name = ((FamilyTypeface*)face)->getUniqueString();
856
857 stream->write8((uint8_t)face->style());
858
859 if (NULL == name || 0 == *name) {
860 stream->writePackedUInt(0);
861
862 } else {
863 uint32_t len = strlen(name);
864 stream->writePackedUInt(len);
865 stream->write(name, len);
866
867 }
396 virtual const char* getUniqueString() const {
397 const char* str = strrchr(fPath.c_str(), '/');
398 if (str) {
399 str += 1;
400 }
401 return str;
402 }
33 char *
34 strrchr(const char *p, int ch)
35 {
36 char *save;
37
38 for (save = NULL;; ++p) {
39 if (*p == (char) ch)
40 save = (char *)p;
41 if (!*p)
42 return(save);
43 }
44
45 }