Praveen each character is stored as two bytes so if the characters are
ascii, you will have the 1 byte character followed by a '/0'. To get the
each character you need to use LittleEndian.getShort then cast to a
character. There should be two '/0' at the end of each font name.

If you have to go 2 characters back, it means you miscalculated the offset.
You need to make sure you figure out why you miscalculated the offset and
correct this.
.
-Ryan


----- Original Message ----- 
From: "Praveen Mathew" <[EMAIL PROTECTED]>
To: "POI Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 8:12 PM
Subject: Re: New FFN & Fontable classes


> Ryan,
>
> Now I am able to print the font names, But Just the starting Character is
> not coming. So I went 2 charcters back, then its ok.
> But After each Character There is a '\0' char coming.
>
> It seems that some extra data is also appended after the name of the font.
>
>
>
> Thanks & Regards
> Praveen
>
>
>
>
>
>
> Praveen Mathew/India/[EMAIL PROTECTED]
> 10/07/2003 00:15
> Please respond to "POI Developers List"
>
>
>         To:     "POI Developers List" <[EMAIL PROTECTED]>
>         cc:
>         Subject:        Re: New FFN & Fontable classes
>
>
>
> I forgot to ask you if you successfully ran your TestFontTable test. Did
> you?
>
> Actually the tes has ran successfully. The 2 fontTables are equal. But
> when I actually tried to print the font names, It seems something has gone
>
> wrong.
> With 3 different Doc files I am getting the _stringCount field (2nd short
> in the header of sttbfffn) as Zero.
>
> I am trying to figure out what could have gone wrong
>
>
> Thanks & Regards
> Praveen
>
>
>
>
>
>
> "Ryan Ackley" <[EMAIL PROTECTED]>
> 09/07/2003 20:28
> Please respond to "POI Developers List"
>
>
>         To:     "POI Developers List" <[EMAIL PROTECTED]>
>         cc:
>         Subject:        Re: New FFN & Fontable classes
>
>
>
> I forgot to ask you if you successfully ran your TestFontTable test. Did
> you? Tonight I will be writing the code that will read in a word document
> and write it back out.
>
> In the meantime, you need to be studying the spec. To write out a new word
> with a different font you will need to use/understand the following
> classes:
> TextPieceTable, TextPiece, CHPAbstractType. You need to look at the spec.
> You need to look at the section entitled "SPRM definitions" this details
> how
> to change formatting properties. You need to look at the CHP structure
> definition.
>
> >               Actually its  a kind of pressure situation here. I need to
> > do the Stream writing & modifying  by this Friday. So I have decided to
> do
> > night outs to catch up with your working time. I am seeking your
> Valuable
> > help for this.
>
> I will always answer your questions as quickly as possible. You will do
> all
> the work on your own. I know how to accomplish what you want but if you
> plan
> on being a contributor to this project you need to learn about the file
> format. I want to see you succeed at your long-term goal not just the
> Friday
> deadline.
>
> > I have a request. I do understand the importance of the test cases for
> the
> > code we write,  but can we for a time being, focus a bit more on the
> > actual writing of streams as whole to make the Doc file & try some
> > modification of streams. Then we can complete all the test cases.
>
> These test cases are necessary because it is absolutely vital that we test
> the algorithms that we are using to write out the data structures. If we
> write a Word document that Word can't open, where do we look for the
> problem? Word does not tell us what the actual problem is it only tells us
> that it is an invalid Word file. Every test I have written except one has
> failed the first time I ran it. The tests are the only reason I feel that
> you may meet your deadline. Don't worry, there is only one more test case
> to
> write for this phase. I will be writing it tonight.
>
> > This can actually make my life better here. I badly need to write a Doc
> ,
> > modifying its Streams atleast in the the simplest way that can be done.
>
> I feel you man, this can actually make my life better too (according to
> Andy)  :-)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to