Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.2 KiB

  1. <%
  2. if Session("FONTSCALE") = "" then
  3. Session("FONTSCALE") = 1
  4. end if
  5. if Session("FONTFACE") = "" then
  6. Session("FONTFACE") = "Helv"
  7. end if
  8. if Session("FONTPOINT") = "" then
  9. Session("FONTPOINT") = 1
  10. end if
  11. if Session("BrowserVScalePct") = "" then
  12. Session("BrowserVScalePct") = 100
  13. end if
  14. if Session("BrowserHScalePct") = "" then
  15. Session("BrowserHScalePct") = 100
  16. end if
  17. Function sFont(iSize,sFace,sColor,bScale)
  18. Dim sOutputStr
  19. sOutputStr = "<FONT"
  20. if sFace <> "" then
  21. sOutputStr = sOutputStr & " FACE='" & sFace & "'"
  22. else
  23. sOutputStr = sOutputStr & " FACE='" & Session("FONTFACE") & "'"
  24. end if
  25. if iSize = "" then
  26. iSize = cInt(Session("FONTPOINT"))
  27. end if
  28. if bScale then
  29. iSize = cInt(iSize * Session("FONTSCALE"))
  30. end if
  31. sOutputStr = sOutputStr & " SIZE=" & iSize
  32. if sColor <> "" then
  33. sOutputStr = sOutputStr & " COLOR=" & sColor
  34. end if
  35. sOutputStr = sOutputStr & ">"
  36. sFont = sOutputStr
  37. End Function
  38. Function iVScale(iSize)
  39. iVScale = iScale(iSize,"BrowserVScalePct")
  40. End Function
  41. Function iHScale(iSize)
  42. iHScale = iScale(iSize,"BrowserHScalePct")
  43. End Function
  44. Function iScale(iSize,direction)
  45. if iSize <> 0 then
  46. iScale = cInt((Session(direction) * iSize)/100)
  47. else
  48. iScale = iSize
  49. end if
  50. End Function
  51. %>