The following 121 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

about   an   and   argument   ascender   Assignment   assignment   at   baseline   be   between   bottom   can   classes   clear   completely   computed   coordinate   coordinates   correct   correspondence   corresponds   decender   descender   Describe   display   dots   easier   established   example   expressed   Face   floor   font   Font   fonts   from   generally   gives   gl   handler   heights   How   if   imaginary   in   inch   inches   information   its   know   lecture   length   let   letter   letters   line   many   mapping   means   modify   most   must   necessary   need   notice   of   often   on   One   Ortho   page   part   per   pixel   pixels   point   points   related   resize   resolution   return   review   screen   Set   should   size   Size   sizes   so   some   span   starts   Taking   terminology   text   Text   that   The   the   there   this   to   To   top   typography   unit   units   us   use   via   Viewport   we   What   which   why   window   wise   with   work   would  

    EdmondYap/Assignment3

Assignment 3

1, First let's review some font terminology. What is the baseline of a font? How are the ascender and decender heights related to the baseline?

The baseline is an imaginary line on the "bottom part" of a line of text(the bottom of letters 'a', 'n', 'd', not 'p'). The ascender (and its length) generally starts at the baseline to the top of the letter 'd'. The descender (and its length) generally starts at the baseline to the top of the letter 'p'.

As an example, we can use page 17 of the typography lecture. The baseline is at the bottom of the 'H'. The ascender is from there to the top of the 'd'. The descender is from there to the bottom of the 'p'.

2. Font sizes are often expressed in points (the argument to STFontFace::SetSize() is in units of points). One point is 1/72 of an inch. To display a font on screen at the correct size, the size of the font in pixels must be computed, which means we need to know the size of a pixel in inches. How many screen pixels would a 14 point font span if the screen has a resolution of 300 DPI (300 dots (pixels) per inch)? (notice that the STText and STFontFace classes return most information about fonts in units of pixels)

14 points * (1 inch / 72 points) * (300 pixels / 1 inch) = 58 1/3 pixels.

Taking a floor, if necessary to do, gives us 58 pixels.

3. Describe the correspondence between window coordinates and pixels that is established via the use of glViewport and glOrtho in the GLUT resize handler. After completely the assignment, it should be clear why it is wise to NOT to not modify this mapping in this assignment?

1 coordinate unit corresponds to 1 pixel. It is easier to work with this mapping, so we do not modify it.

Recent